matplotlib / cheatsheets

Official Matplotlib cheat sheets

Home Page:https://matplotlib.org/cheatsheets/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

markevery

SzymonGrabowski opened this issue · comments

handout-intermediate.pdf, "Lines & markers"
Given X of length 1000, the plot with markevery=25 should mark 1000/25 = 40 points, but there are 20 of them on the figure, so it seems a bug to me. (If so, it matters also to the next example, in "Scales & projections").

The actual code appears to use markevery=500:

(fig, ax) = plt.subplots(figsize=(5.7/2.54, 1.0/2.54))
ax.plot(X, Y, "C1o:", markevery=500, mec="1.0")
ax.set_ylim(-1.5, 1.5)
fig.savefig("../figures/sine-marker.pdf")
fig, ax = plt.subplots(figsize=(5.7/2.54, 1.0/2.54))
ax.set_xscale("log")
ax.plot(X, Y, "-")
ax.plot(X, Y, "C1o-", markevery=500, mec="1.0")
ax.set_ylim(-1.5, 1.5)
fig.savefig("../figures/sine-logscale.pdf")

Are you interested in putting a PR to fix this?