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
{{ message }}
Repository navigation
Validate assignments to rcParams-like dictionaries #69
The rcParamsShort and rcParamsCustom dictionaries in rctools.py (used to power the rc_configurator) should have restricted keys and automatic entry validation, like rcParams. This can be done using the existing public matplotlib API and the RcParams class. It's a minor issue, maybe post-v1.
This change is ready to be added after the #91 merge
It probably does need to be included in v1 because otherwise incorrect entries in .proplotrc or assignments to plot.rc are extremely difficult to debug. We can borrow the various validate_* fucntions from matplotlib/rcsetup.py, and might want to also design a new "units" validator (inches, centimeters, etc.) and refactor the units function to use this validator.
This is finally done 🎉 . All assignments are validated using an rc_proplot dictionary analogous to rc_matplotlib. Decided it would be better to just have a separate minimal validated dictionary for storing my own settings and continuing to use Configurator rather than trying to sync both of them into some giant RcParams overall.
Activity
lukelbd commentedon Jan 8, 2020
This change is ready to be added after the #91 merge
It probably does need to be included in v1 because otherwise incorrect entries in
.proplotrcor assignments toplot.rcare extremely difficult to debug. We can borrow the variousvalidate_*fucntions frommatplotlib/rcsetup.py, and might want to also design a new "units" validator (inches, centimeters, etc.) and refactor theunitsfunction to use this validator.lukelbd commentedon Jul 30, 2021
This should also pass assignments to
rc.cmapandrc.cyclethrough their respective constructor functions (see #169).lukelbd commentedon Aug 18, 2021
This is finally done 🎉 . All assignments are validated using an
rc_proplotdictionary analogous torc_matplotlib. Decided it would be better to just have a separate minimal validated dictionary for storing my own settings and continuing to useConfiguratorrather than trying to sync both of them into some giantRcParamsoverall.