-
Notifications
You must be signed in to change notification settings - Fork 103
Refactor rc_configurator and geoaxes, add new gridline features #167
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #61, resolves #165, and resolves #27. This PR makes several improvements to
rc_configurator
and cleans up the settings as follows:tick.color
changes bothxtick.color
andytick.color
) while other quick settings and "added" settings had no children (e.g.inlinefmt
).cartopy.global
rc setting that determines whether the extent of projections is global or is determined by content plotted in the axes like in cartesian axes. The default isTrue
. May add othercartopy
rc settings in the future.small
andlarge
are now the relative sizes'medium'
and'med-large'
(proplot adds'med-small'
and'med-large'
tofont_scalings
). Relative font sizes are a builtin matplotlib feature that I was not aware of when I implemented these settings.small
andlarge
tofont.labelsize
andfont.titlesize
to reflect the fact that their usage should be discouraged in favor of modifying thefont.size
point size, and letting the relative sizesrc['font.labelsize'] = 'medium'
andrc['font.titlesize'] = 'med-large'
scale everything up automatically.grid
andgeogrid
settings, because this was confusing for many users (e.g. Why doesn't "x" work with cartopy/basemap plots? #131) and there was not much justification for this extra complication -- and if we havegeogrid
settings, why not also havepolargrid
? I have also removed the relatedgeoaxes
settings.grid
andgridminor
-- namelygrid.loninline
,grid.latinline
,grid.lonstep
,grid.latstep
,grid.latmax
,grid.labels
,grid.labelpad
,grid.labelsize
,grid.labelrotate
,gridminor.latstep
, andgridminor.lonstep
. These are simply ignored by cartesian and polar axes.GeoAxes.format()
now hasdms
,loninline
,latinline
, androtatelabels
keyword args for controlling cartopy gridline behavior.grid.below
setting as a more obvious alias foraxes.axisbelow
that addresses Map projection gridlines are layered much too high #61. The default is the same as matplotlib's default, i.e.rc['grid.below'] = 'line'
. This puts gridlines below lines but above patches like filled contours.zorder
options to all the cartographic feature settings, i.e.land.zorder
,coast.zorder
, etc. The default value for all is0.75
so that they appear below all plotted content, but they will appear above gridlines ifgrid.below
is set toTrue
(which corresponds tozorder=0.5
). This way you can also create land and ocean masks on top of plotted content with e.g.plot.rc['land.zorder'] = 3
orplot.rc['ocean.zorder'] = 3
.'x-hi'
and'xx-hi'
as options for therc.reso
setting. The basemap resolution mapping is'lo' --> 'c'
(crude),'med' --> 'l'
(low),'hi' --> 'i'
(intermediate),'x-hi' --> 'h'
(high), and'xx-hi' --> 'f'
(fine). This is so they roughly correspond to the available cartopy resolutions'lo' --> '110m'
,'med' --> '50m'
, and'hi' --> '10m'
. Basemap resolutions can get way higher than cartopy. Also before there was a bug where the proplot ignoredrc.reso
when makingBasemap
instances -- this is now fixed.Note that none of these removals will cause anyone's old code to error. ProPlot now uses a simple deprecation system (see
internals/warnings.py
) that emits warnings and translates old names to new names where possible.