rougier / scientific-visualization-book

An open access book on scientific visualization using python and matplotlib
https://www.labri.fr/perso/nrougier/
Other
10.66k stars 986 forks source link

Inconsistent commas in the code (Chapter 2, page 22) #63

Closed labdmitriy closed 2 years ago

labdmitriy commented 2 years ago

Hi @rougier,

Еhere is a slight inconsistency in the code from the book - there is no comma after zorder argument, but after linestyle argument there is a comma (technically the latter case is not an error, but usually trailing comma is used with different code formatting):

plt.plot(P[:,0], P[:,1], clip_on=False, zorder=-10
         color="k", linewidth=1.0, linestyle="--", )

Perhaps the following code was meant:

plt.plot(P[:,0], P[:,1], clip_on=False, zorder=-10,
         color="k", linewidth=1.0, linestyle="--")

Thank you.

rougier commented 2 years ago

Nice catch, thanks. PR welcome.