Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Added missing side tick rcParams #6735

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
merged 2 commits into from
Jul 16, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
House keeping files, fixed formatting
  • Loading branch information
bcongdon committed Jul 13, 2016
commit 1bf99bbeb0f67b95ecd5b5ae806bd80ce8eca089
5 changes: 5 additions & 0 deletions 5 doc/users/whats_new/ticks_rcparams.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where


``hist.bins`` to control the default number of bins to use in
`~matplotlib.axes.Axes.hist`. This can be an `int`, a list of floats, or
``'auto'`` if numpy >= 1.11 is installed.
32 changes: 13 additions & 19 deletions 32 lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,25 +567,19 @@ def __init__(self, fig, rect,
self._ycid = self.yaxis.callbacks.connect('units finalize',
self.relim)

self.tick_params(top=rcParams['xtick.top'] and
rcParams['xtick.minor.top'],
bottom=rcParams['xtick.bottom'] and
rcParams['xtick.minor.bottom'],
left=rcParams['ytick.left'] and
rcParams['ytick.minor.left'],
right=rcParams['ytick.right'] and
rcParams['ytick.minor.right'],
which='minor')

self.tick_params(top=rcParams['xtick.top'] and
rcParams['xtick.major.top'],
bottom=rcParams['xtick.bottom'] and
rcParams['xtick.major.bottom'],
left=rcParams['ytick.left'] and
rcParams['ytick.major.left'],
right=rcParams['ytick.right'] and
rcParams['ytick.major.right'],
which='major')
self.tick_params(
top=rcParams['xtick.top'] and rcParams['xtick.minor.top'],
bottom=rcParams['xtick.bottom'] and rcParams['xtick.minor.bottom'],
left=rcParams['ytick.left'] and rcParams['ytick.minor.left'],
right=rcParams['ytick.right'] and rcParams['ytick.minor.right'],
which='minor')

self.tick_params(
top=rcParams['xtick.top'] and rcParams['xtick.major.top'],
bottom=rcParams['xtick.bottom'] and rcParams['xtick.major.bottom'],
left=rcParams['ytick.left'] and rcParams['ytick.major.left'],
right=rcParams['ytick.right'] and rcParams['ytick.major.right'],
which='major')

def __setstate__(self, state):
self.__dict__ = state
Expand Down
9 changes: 8 additions & 1 deletion 9 lib/matplotlib/mpl-data/stylelib/classic.mplstyle
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ xtick.minor.pad : 4 # distance to the minor tick label in points
xtick.color : k # color of the tick labels
xtick.labelsize : medium # fontsize of the tick labels
xtick.direction : in # direction: in, out, or inout
xtick.major.top : True # draw x axis top major ticks
xtick.major.bottom : True # draw x axis bottom major ticks
xtick.minor.top : True # draw x axis top minor ticks
xtick.minor.bottom : True # draw x axis bottom minor ticks

ytick.left : True # draw ticks on the left side
ytick.right : True # draw ticks on the right side
Expand All @@ -256,7 +260,10 @@ ytick.minor.pad : 4 # distance to the minor tick label in points
ytick.color : k # color of the tick labels
ytick.labelsize : medium # fontsize of the tick labels
ytick.direction : in # direction: in, out, or inout

ytick.major.left : True # draw y axis left major ticks
ytick.major.right : True # draw y axis right major ticks
ytick.minor.left : True # draw y axis left minor ticks
ytick.minor.right : True # draw y axis right minor ticks

### GRIDS
grid.color : k # grid color
Expand Down
19 changes: 8 additions & 11 deletions 19 lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,12 +1174,10 @@ def validate_animation_writer_path(p):
'xtick.minor.pad': [3.4, validate_float], # distance to label in points
'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], # visability of the x axis top minor ticks
'xtick.minor.bottom': [True, validate_bool], # visability of the x axis bottom minor ticks
'xtick.major.top': [True, validate_bool], # visability of the x axis top major ticks
'xtick.major.bottom': [True, validate_bool], # visability of the x axis bottom major 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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra blank line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

# fontsize of the xtick labels
'xtick.labelsize': ['medium', validate_fontsize],
Expand All @@ -1195,11 +1193,10 @@ def validate_animation_writer_path(p):
'ytick.minor.pad': [3.4, validate_float], # distance to label in points
'ytick.color': ['k', validate_color], # color of the ytick labels
'ytick.minor.visible': [False, validate_bool], # visiablility of the y axis minor ticks

'ytick.minor.left': [True, validate_bool], # visability of the y axis top minor ticks
'ytick.minor.right': [True, validate_bool], # visability of the y axis bottom minor ticks
'ytick.major.left': [True, validate_bool], # visability of the y axis top major ticks
'ytick.major.right': [True, validate_bool], # visability of the y axis bottom major ticks
'ytick.minor.left': [True, validate_bool], # draw y axis left minor ticks
'ytick.minor.right': [True, validate_bool], # draw y axis right minor ticks
'ytick.major.left': [True, validate_bool], # draw y axis left major ticks
'ytick.major.right': [True, validate_bool], # draw y axis right major ticks

# fontsize of the ytick labels
'ytick.labelsize': ['medium', validate_fontsize],
Expand Down
8 changes: 8 additions & 0 deletions 8 matplotlibrc.template
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@ backend : $TEMPLATE_BACKEND
#xtick.labelsize : medium # fontsize of the tick labels
#xtick.direction : out # direction: in, out, or inout
#xtick.minor.visible : False # visibility of minor ticks on x-axis
#xtick.major.top : True # draw x axis top major ticks
#xtick.major.bottom : True # draw x axis bottom major ticks
#xtick.minor.top : True # draw x axis top minor ticks
#xtick.minor.bottom : True # draw x axis bottom minor ticks

#ytick.left : True # draw ticks on the left side
#ytick.right : False # draw ticks on the right side
Expand All @@ -386,6 +390,10 @@ backend : $TEMPLATE_BACKEND
#ytick.labelsize : medium # fontsize of the tick labels
#ytick.direction : out # direction: in, out, or inout
#ytick.minor.visible : False # visibility of minor ticks on y-axis
#xtick.major.left : True # draw y axis left major ticks
#xtick.major.right : True # draw y axis right major ticks
#xtick.minor.left : True # draw y axis left minor ticks
#xtick.minor.right : True # draw y axis right minor ticks


### GRIDS
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.