-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ENH: Set the alpha value for plots in rcParams #5132
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
You can do this by setting a the color/prop cycle to use colors which have an alpha component. The traitlet overhaul will take care of this as well |
Can i set the "axes.color_cycle" values in hex natation as e.g.: |
take out the pound sign because our rcfile reader is really naive and Also note that color_cycle is deprecated in the upcoming 1.5 release, On Thu, Sep 24, 2015 at 9:30 AM, Jul3k notifications@github.com wrote:
|
Without the pound sign i get a "to_rgb: Invalid rgb arg "ff0000b4"" error.
matplotlib version 1.4.3 Without the alpha content ("b4") it works fine. It seams to me that the parser doese not accept 4 Byte hex color codes with alpha content. I could work around this by using the to_rgba builtin method My workaround looks as follows:
|
Ah, indeed, our hex color spec parser is just rgb, not rgb[a]. Sounds like On Thu, Sep 24, 2015 at 10:21 AM, Jul3k notifications@github.com wrote:
|
Pretty sure rcparams will take a 4-tuple an input |
Yes rcparams takes a 4-tuple as an input. As @WeatherGod stated the problem was related to the fact that the color parser only checks for 3-Byte (#FFFFFF) color strings and does not understand 4-Byte (#FFFFFFAA) color strings with alpha channel. So the way i presented the color information was not suiteable to the parser |
@Jul3k Can you make a new issue to upgrade out hex parser to deal with RGBA hex codes? |
I opend a new issue relating to the color spec parser |
I think this is closed by #6382, which updated the parser to allow 4-byte hex strings. Re-open this issue if that isn't sufficient. |
I frequently need |
This is too specialized for |
Using Matplotlib i often find myself repeadily writing the following to change the alpha value of the plots:
plot(x,y1, alpha=.6)
plot(x,y2, alpha=.6)
plot(x,y3, alpha=.6)
...
I was hoping to find a matching value in the rcParameters to change to option globally like:
plt.rcParams['lines.alpha'] = 0.6
Could this be implemented so it can be set in a style sheet and the code stays short and readable?
The text was updated successfully, but these errors were encountered: