Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Inherit default grid and tick style from matplotlib.rcParams #49

Merged
merged 4 commits into from
Jun 18, 2014

Conversation

lpsinger
Copy link
Contributor

This replaces #43 and #44, but adds a unit test.

Based on `matplotlib.axis.YTick._get_gridline`. Note that Matplotlib
implements gridlines with `Line2D`, whereas wcsaxes implements gridlines
with `PathPatch`. The two have slightly different option styles
regarding dashes, so we have to map between them.
Note that Matplotlib's defaults dictionary contains default settings
only for `xtick.*` and `ytick.*`. Because there is not a fixed mapping
between WCS axes and Matplotlib `x` and `y` axes, the best we can do is
arbitrarily pick one axis from which to inherit defaults.

This is explained in the docstring.
And update original unit tests to explicitly set tick width and size,
overriding default values, so that they continue to pass.
@astrofrog
Copy link
Owner

@lpsinger - thanks! I think it would be good to add the same for tick label and axis label parameters, but we can add this later.

astrofrog added a commit that referenced this pull request Jun 18, 2014
Inherit default grid and tick style from `matplotlib.rcParams`
@astrofrog astrofrog merged commit 8652a86 into astrofrog:master Jun 18, 2014
@lpsinger lpsinger deleted the rcparams branch June 18, 2014 16:31
astrofrog added a commit that referenced this pull request Nov 28, 2016
Inherit default grid and tick style from `matplotlib.rcParams`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants