Added missing side tick rcParams #6735

Merged
merged 2 commits into from Jul 16, 2016

Conversation

Projects
None yet
5 participants
Contributor

bcongdon commented Jul 13, 2016

Addresses #6691.

Adds <x/y>tick.<major/minor>.* for configuring which side ticks are drawn via rcParams.

Per this change, similar tags like xtick.top and xtick.minor.top are and'ed to get the actual tick draw status.

mdboom added the needs_review label Jul 13, 2016

@QuLogic QuLogic commented on the diff Jul 13, 2016

doc/users/whats_new/ticks_rcparams.rst
@@ -5,6 +5,11 @@ The parameters ``xtick.top``, ``xtick.bottom``, ``ytick.left``
and ``ytick.right`` were added to control where the ticks
are drawn.
+Furthermore, the parameters ``xtick.major.top``, ``xtick.major.bottom``,
+``xtick.minor.top``, ``xtick.minor.bottom``, ``ytick.major.left``,
+``ytick.major.right``, ``ytick.minor.left``, and ``ytick.minor.right`` were
+added to control were ticks are drawn.

@QuLogic QuLogic and 1 other commented on an outdated diff Jul 13, 2016

lib/matplotlib/axes/_base.py
@@ -566,11 +566,26 @@ def __init__(self, fig, rect,
if self.yaxis is not None:
self._ycid = self.yaxis.callbacks.connect('units finalize',
self.relim)
- self.tick_params(top=rcParams['xtick.top'],
- bottom=rcParams['xtick.bottom'],
- left=rcParams['ytick.left'],
- right=rcParams['ytick.right'],
- which='both')
+
+ self.tick_params(top=rcParams['xtick.top'] and
+ rcParams['xtick.minor.top'],
@QuLogic

QuLogic Jul 13, 2016

Member

This alignment is a bit confusing. I'm pretty sure you could put each parameter on its own line with an extra indent, and it should fix within 79 chars.

@bcongdon

bcongdon Jul 13, 2016

Contributor

I agree that is a bit confusing, however they both don't fit on the same line within 79 characters.

@QuLogic

QuLogic Jul 13, 2016

Member

Bottom is the longest, and should be 79 if moved to its own line. I mean like this:

        self.tick_params(
            top=...
            bottom=...
            ...)
@bcongdon

bcongdon Jul 13, 2016

Contributor

Right. Thanks!

@QuLogic QuLogic and 1 other commented on an outdated diff Jul 13, 2016

lib/matplotlib/rcsetup.py
@@ -1175,6 +1175,12 @@ def validate_animation_writer_path(p):
'xtick.color': ['k', validate_color], # color of the xtick labels
'xtick.minor.visible': [False, validate_bool], # visiablility of the x axis minor ticks
+ 'xtick.minor.top': [True, validate_bool], # draw x axis top minor ticks
+ 'xtick.minor.bottom': [True, validate_bool], # draw x axis bottom minor ticks
+ 'xtick.major.top': [True, validate_bool], # draw x axis top major ticks
+ 'xtick.major.bottom': [True, validate_bool], # draw x axis bottom major ticks
+
@QuLogic

QuLogic Jul 13, 2016

Member

Extra blank line.

@bcongdon

bcongdon Jul 13, 2016

Contributor

Fixed.

@bcongdon bcongdon House keeping files, fixed formatting
1bf99bb
Contributor

janschulz commented Jul 15, 2016

Closing and reopening to run with miktex changes on appveyor to see if that lets the appveyor tests pass.

janschulz closed this Jul 15, 2016

janschulz reopened this Jul 15, 2016

@mdboom mdboom added needs_review and removed needs_review labels Jul 15, 2016

@tacaswell tacaswell merged commit b9aedb8 into matplotlib:master Jul 16, 2016

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.0007%) to 70.367%
Details

tacaswell removed the needs_review label Jul 16, 2016

@QuLogic QuLogic added a commit that referenced this pull request Jul 17, 2016

@tacaswell @QuLogic tacaswell + QuLogic Merge pull request #6735 from bcongdon/feature_rcParam_side_tick
ENH: Added missing side tick rcParams
4721d2e
Member

QuLogic commented Jul 17, 2016 edited

Backported to v2.x as 4721d2e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment