-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
axhline/axvline don't use prop_cycle #14222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Usually these are not meant to represent data, but rather some interesting value. Hence, I don't think they should participate in the cycle.... |
@jklymak Thanks for the answer. I don't see the distinction between a single value and data (an array of values), but it sounds like your typical use-case is more like a configurable grid line or annotation, in which case I would expect the default color to be gray or black instead of 'tab:blue', so as to distinguish it from data lines plotted with the default color cycle. But if the consensus is that the current behavior is desired, I will close the issue. |
Yeah, that's exactly how I think of it. I'd be for the default being black, but.... FWIW, I think you can manually use the cycle colors... |
Do you mean something more sophisticated than |
@u55 You can do things like for j, stys in enumerate(my_cycler):
ax.axhline(j, **stys) I think @jklymak 's analysis is correct and a common usage is easily configurable "extra" grid lines. The default color ends up falling through to However changing the default color of At this point, I am concerned about changing default colors ad-hoc as once we start to go down that route it opens up a rather scary can of worms.... |
@tacaswell Yeah, I also wouldn't expect you to change the default color now, at least not until the next major version bump (4.0). |
Hi matplotlib developers,
axhline
andaxvline
do not use the prop_cycle, and it seems to me that they should. Was this intentional?Tested with matplotlib 3.0.3 and python 3.7.3 (Anaconda) on Windows 10.
The text was updated successfully, but these errors were encountered: