import numpy as np import numpy.random as nr import plotly py = plotly.plotly('IPython.Demo', '1fw3zw2o13') distributions = [nr.uniform, nr.normal , lambda size: nr.normal(0, 0.2, size=size), lambda size: nr.beta(a=0.5, b=0.5, size=size), lambda size: nr.beta(a=0.5, b=2, size=size)] names = ['Uniform(0,1)', 'Normal(0,1)', 'Normal(0, 0.2)', 'beta(a=0.5, b=0.5)', 'beta(a=0.5, b=2)'] boxes = [{'y': dist(size=50), 'type': 'box', 'boxpoints': 'all', 'jitter': 0.5, 'pointpos': -1.8, 'name': name} for dist, name in zip(distributions, names)] layout = {'title': 'A few distributions', 'showlegend': False, 'xaxis': {'ticks': '', 'showgrid': False, 'showline': False} 'yaxis': {'zeroline': False, 'ticks': '', 'showline': False}, } py.iplot(boxes, layout = layout, filename='Distributions', fileopt='overwrite', width=1000, height=650)