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)})$'])