Figure 3.9) ValueError

258 views
Skip to first unread message

mason leist

unread,
Mar 3, 2021, 6:56:32 PM3/3/21
to astroML-general
Hello again,

while playing with the code for Figure 3.9) I came across the following error value:

ValueError: '---' is not a valid value for ls; supported values are '-', '--', '-.', ':', 'None', ' ', '', 'solid', 'dashed', 'dashdot', 'dotted'

This is being thrown on the line of code:

for (n, b, ls) in zip(n_values, b_values, linestyles): # create a binomial distribution 
  dist = binom(n, b) 
  plt.plot(x, dist.pmf(x), color='black', linestyle='steps-mid' + ls, label=r'$b=%.1f,\ n=%i$' % (b, n))

I was wondering if you could recommend a fix for this issue? Thank you!

Mason Leist

Brigitta Sipocz

unread,
Mar 3, 2021, 7:58:03 PM3/3/21
to mason leist, astroML-general
Dear Mason,

While I'm updating the website, please use the version from the github repo, it has the fix for changes in the matplotlib API.


Cheers,
 Brigitta

--
You received this message because you are subscribed to the Google Groups "astroML-general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astroml-gener...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astroml-general/8223c1df-7f16-4fd8-8778-d3d8d14578a0n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages