Skip to content

axhline/axvline don't use prop_cycle #14222

Closed
@u55

Description

@u55

Hi matplotlib developers,
axhline and axvline do not use the prop_cycle, and it seems to me that they should. Was this intentional?

import numpy as np
import matplotlib.pyplot as plt
from cycler import cycler

fig, ax = plt.subplots()
ax.set_prop_cycle(cycler(color=['r', 'g', 'y', 'm'], ls=['--']*4))
ax.plot(np.arange(9))
ax.axhline(4) # uses default styles instead of cycler
ax.axvline(4) # uses default styles instead of cycler
ax.plot(-np.arange(9))
plt.show()

Tested with matplotlib 3.0.3 and python 3.7.3 (Anaconda) on Windows 10.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions