You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How about setting default configuration values to their matplotib value if it exists, at least for some of the settings?
In the example above, the default colormap is set to "fire" whereas I would like the default "viridis" from matplotlib instead.
This may apply to several other conflicting settings.
I agree that you want to make all proplot plots beautiful by default, but I'm not sure all default matplotlib settings must be changed.
A solution would be to check if a config value is set to "None" by the user, and in this case to use the matplotlib value if it exists.
The text was updated successfully, but these errors were encountered:
Yeah this is definitely one of ProPlot's pain points. As you have guessed, I was never sure how to address this because I did want proplot to override matplotlib's settings in order to make things "nice"... but checking for user overrides and user-enabled matplotlib stylesheets is a great idea. Just have to figure out how to inject proplot's default settings in-between the steps where (1) matplotlib loads its default settings and (2) matplotlib loads the user-specific matplotlib settings.
I'll add this in a future version.
lukelbd
changed the title
Why overridding all matplotlib defaults?
Using default matplotlib settings / stylesheets support
May 9, 2020
@stefraynaud I finally added stylesheet control via c831910 and edc6f3c. New version will come out soon.
I can't really check for None for every setting in .proplotrc because None might be valid values for some rc settings. And the way proplot's rc_configurator is currently designed, this would be really difficult anyway, because even if you try to tell proplot not to overwrite an individual setting (e.g. xtick.label.size), proplot's defaults for the "meta" settings (e.g. small, the font size for "small" text labels) could end up overwriting it anyway. When #109 is merged there will be no "default" meta settings so I could theoretically implement this.
However if you want to use all of matplotlib's default settings instead of proplot's settings, you can add the following line to your proplotrc file.
style: default
Or use any other stylesheet, like
style: fivethirtyeight
I made it so that matplotlib stylesheets are always applied on top of matplotlib's default settings, rather than proplot's default settings. Also, proplot does not support changing proplot-specific settings like abc.loc in matplotlib stylesheets, but I'll be able to do so after I start subclassing RcParams directly when #109 is merged.
Note that in your case, if you just want to change the default colormap but keep other settings, you can do so manually with:
https://github.com/lukelbd/proplot/blob/3f065778edce6e07b109e436b504238c7194f04f/proplot/rctools.py#L48
How about setting default configuration values to their matplotib value if it exists, at least for some of the settings?
In the example above, the default colormap is set to
"fire"
whereas I would like the default"viridis"
from matplotlib instead.This may apply to several other conflicting settings.
I agree that you want to make all proplot plots beautiful by default, but I'm not sure all default matplotlib settings must be changed.
A solution would be to check if a config value is set to
"None"
by the user, and in this case to use the matplotlib value if it exists.The text was updated successfully, but these errors were encountered: