-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Open
Labels
Description
Bug summary
markevery[float]
is supposed to result in evenly distributed markers, but when y-data is noisy, its effect seems to "gradually" fade away.
Code for reproduction
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(1e3, 1e7, 1000)
fig, ax = plt.subplots(nrows=3, ncols=3, figsize=(9, 9), layout="constrained")
for i, ax_i in enumerate(ax.flatten()):
ax_i.set_title(f"noise level = {i/5:.1f}")
y = np.exp(x**0.1) + np.random.rand(len(x)) * i/2
ax_i.plot(x, y, 'b.-', markevery=0.1, ms=10, markerfacecolor="r")
ax_i.set_xscale("log")
ax_i.set_yscale("log")
Actual outcome
Expected outcome
All subplots be like the one with 0 noise level.
Additional information
No response
Operating system
Ubuntu
Matplotlib Version
3.8.3
Matplotlib Backend
matplotlib_inline.backend_inline
Python version
3.10.13
Jupyter version
No response
Installation
pip