Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1bf99bb

Browse files
committed
House keeping files, fixed formatting
1 parent fc7c026 commit 1bf99bb

File tree

5 files changed

+42
-31
lines changed

5 files changed

+42
-31
lines changed

doc/users/whats_new/ticks_rcparams.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ The parameters ``xtick.top``, ``xtick.bottom``, ``ytick.left``
55
and ``ytick.right`` were added to control where the ticks
66
are drawn.
77

8+
Furthermore, the parameters ``xtick.major.top``, ``xtick.major.bottom``,
9+
``xtick.minor.top``, ``xtick.minor.bottom``, ``ytick.major.left``,
10+
``ytick.major.right``, ``ytick.minor.left``, and ``ytick.minor.right`` were
11+
added to control were ticks are drawn.
12+
813
``hist.bins`` to control the default number of bins to use in
914
`~matplotlib.axes.Axes.hist`. This can be an `int`, a list of floats, or
1015
``'auto'`` if numpy >= 1.11 is installed.

lib/matplotlib/axes/_base.py

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -567,25 +567,19 @@ def __init__(self, fig, rect,
567567
self._ycid = self.yaxis.callbacks.connect('units finalize',
568568
self.relim)
569569

570-
self.tick_params(top=rcParams['xtick.top'] and
571-
rcParams['xtick.minor.top'],
572-
bottom=rcParams['xtick.bottom'] and
573-
rcParams['xtick.minor.bottom'],
574-
left=rcParams['ytick.left'] and
575-
rcParams['ytick.minor.left'],
576-
right=rcParams['ytick.right'] and
577-
rcParams['ytick.minor.right'],
578-
which='minor')
579-
580-
self.tick_params(top=rcParams['xtick.top'] and
581-
rcParams['xtick.major.top'],
582-
bottom=rcParams['xtick.bottom'] and
583-
rcParams['xtick.major.bottom'],
584-
left=rcParams['ytick.left'] and
585-
rcParams['ytick.major.left'],
586-
right=rcParams['ytick.right'] and
587-
rcParams['ytick.major.right'],
588-
which='major')
570+
self.tick_params(
571+
top=rcParams['xtick.top'] and rcParams['xtick.minor.top'],
572+
bottom=rcParams['xtick.bottom'] and rcParams['xtick.minor.bottom'],
573+
left=rcParams['ytick.left'] and rcParams['ytick.minor.left'],
574+
right=rcParams['ytick.right'] and rcParams['ytick.minor.right'],
575+
which='minor')
576+
577+
self.tick_params(
578+
top=rcParams['xtick.top'] and rcParams['xtick.major.top'],
579+
bottom=rcParams['xtick.bottom'] and rcParams['xtick.major.bottom'],
580+
left=rcParams['ytick.left'] and rcParams['ytick.major.left'],
581+
right=rcParams['ytick.right'] and rcParams['ytick.major.right'],
582+
which='major')
589583

590584
def __setstate__(self, state):
591585
self.__dict__ = state

lib/matplotlib/mpl-data/stylelib/classic.mplstyle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,10 @@ xtick.minor.pad : 4 # distance to the minor tick label in points
243243
xtick.color : k # color of the tick labels
244244
xtick.labelsize : medium # fontsize of the tick labels
245245
xtick.direction : in # direction: in, out, or inout
246+
xtick.major.top : True # draw x axis top major ticks
247+
xtick.major.bottom : True # draw x axis bottom major ticks
248+
xtick.minor.top : True # draw x axis top minor ticks
249+
xtick.minor.bottom : True # draw x axis bottom minor ticks
246250

247251
ytick.left : True # draw ticks on the left side
248252
ytick.right : True # draw ticks on the right side
@@ -256,7 +260,10 @@ ytick.minor.pad : 4 # distance to the minor tick label in points
256260
ytick.color : k # color of the tick labels
257261
ytick.labelsize : medium # fontsize of the tick labels
258262
ytick.direction : in # direction: in, out, or inout
259-
263+
ytick.major.left : True # draw y axis left major ticks
264+
ytick.major.right : True # draw y axis right major ticks
265+
ytick.minor.left : True # draw y axis left minor ticks
266+
ytick.minor.right : True # draw y axis right minor ticks
260267

261268
### GRIDS
262269
grid.color : k # grid color

lib/matplotlib/rcsetup.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,12 +1174,10 @@ def validate_animation_writer_path(p):
11741174
'xtick.minor.pad': [3.4, validate_float], # distance to label in points
11751175
'xtick.color': ['k', validate_color], # color of the xtick labels
11761176
'xtick.minor.visible': [False, validate_bool], # visiablility of the x axis minor ticks
1177-
1178-
'xtick.minor.top': [True, validate_bool], # visability of the x axis top minor ticks
1179-
'xtick.minor.bottom': [True, validate_bool], # visability of the x axis bottom minor ticks
1180-
'xtick.major.top': [True, validate_bool], # visability of the x axis top major ticks
1181-
'xtick.major.bottom': [True, validate_bool], # visability of the x axis bottom major ticks
1182-
1177+
'xtick.minor.top': [True, validate_bool], # draw x axis top minor ticks
1178+
'xtick.minor.bottom': [True, validate_bool], # draw x axis bottom minor ticks
1179+
'xtick.major.top': [True, validate_bool], # draw x axis top major ticks
1180+
'xtick.major.bottom': [True, validate_bool], # draw x axis bottom major ticks
11831181

11841182
# fontsize of the xtick labels
11851183
'xtick.labelsize': ['medium', validate_fontsize],
@@ -1195,11 +1193,10 @@ def validate_animation_writer_path(p):
11951193
'ytick.minor.pad': [3.4, validate_float], # distance to label in points
11961194
'ytick.color': ['k', validate_color], # color of the ytick labels
11971195
'ytick.minor.visible': [False, validate_bool], # visiablility of the y axis minor ticks
1198-
1199-
'ytick.minor.left': [True, validate_bool], # visability of the y axis top minor ticks
1200-
'ytick.minor.right': [True, validate_bool], # visability of the y axis bottom minor ticks
1201-
'ytick.major.left': [True, validate_bool], # visability of the y axis top major ticks
1202-
'ytick.major.right': [True, validate_bool], # visability of the y axis bottom major ticks
1196+
'ytick.minor.left': [True, validate_bool], # draw y axis left minor ticks
1197+
'ytick.minor.right': [True, validate_bool], # draw y axis right minor ticks
1198+
'ytick.major.left': [True, validate_bool], # draw y axis left major ticks
1199+
'ytick.major.right': [True, validate_bool], # draw y axis right major ticks
12031200

12041201
# fontsize of the ytick labels
12051202
'ytick.labelsize': ['medium', validate_fontsize],

matplotlibrc.template

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,10 @@ backend : $TEMPLATE_BACKEND
373373
#xtick.labelsize : medium # fontsize of the tick labels
374374
#xtick.direction : out # direction: in, out, or inout
375375
#xtick.minor.visible : False # visibility of minor ticks on x-axis
376+
#xtick.major.top : True # draw x axis top major ticks
377+
#xtick.major.bottom : True # draw x axis bottom major ticks
378+
#xtick.minor.top : True # draw x axis top minor ticks
379+
#xtick.minor.bottom : True # draw x axis bottom minor ticks
376380

377381
#ytick.left : True # draw ticks on the left side
378382
#ytick.right : False # draw ticks on the right side
@@ -386,6 +390,10 @@ backend : $TEMPLATE_BACKEND
386390
#ytick.labelsize : medium # fontsize of the tick labels
387391
#ytick.direction : out # direction: in, out, or inout
388392
#ytick.minor.visible : False # visibility of minor ticks on y-axis
393+
#xtick.major.left : True # draw y axis left major ticks
394+
#xtick.major.right : True # draw y axis right major ticks
395+
#xtick.minor.left : True # draw y axis left minor ticks
396+
#xtick.minor.right : True # draw y axis right minor ticks
389397

390398

391399
### GRIDS

0 commit comments

Comments
 (0)