| 1875 | |
| 1876 | @image_comparison(['markevery.png'], remove_text=True, style='mpl20') |
| 1877 | def test_markevery(): |
| 1878 | x = np.linspace(0, 10, 100) |
| 1879 | y = np.sin(x) * np.sqrt(x/10 + 0.5) |
| 1880 | |
| 1881 | # check marker only plot |
| 1882 | fig, ax = plt.subplots() |
| 1883 | ax.plot(x, y, 'o', label='default') |
| 1884 | ax.plot(x, y+1, 'd', markevery=None, label='mark all') |
| 1885 | ax.plot(x, y+2, 's', markevery=10, label='mark every 10') |
| 1886 | ax.plot(x, y+3, '+', markevery=(5, 20), label='mark every 20 starting at 5') |
| 1887 | ax.legend() |
| 1888 | |
| 1889 | |
| 1890 | @image_comparison(['markevery_line.png'], remove_text=True, style='mpl20') |