Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Just put layout options in a dictionary:

reset()
import scipy.stats
n = 2000
p = 0.2
binom_dist = scipy.stats.binom(n,p)
Layout = {'frame': True, 'axes_labels': ['$k$', f'$B(k,{n},{float(p)})$']}
bar_chart([binom_dist.pmf(x) for x in range(n)], **Layout)

or, as an alternative syntax, you can replace the assigment to Layout by

Layout = dict(frame=True, axes_labels=['$k$', f'$B(k,{n},{float(p)})$'])