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

Skip to content

Commit f76508d

Browse files
committed
adding rcparams
1 parent 9299bcc commit f76508d

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

lib/matplotlib/rcsetup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,7 @@ def _validate_linestyle(ls):
13101310
'xtick.minor.bottom': [True, validate_bool], # draw x axis bottom minor ticks
13111311
'xtick.major.top': [True, validate_bool], # draw x axis top major ticks
13121312
'xtick.major.bottom': [True, validate_bool], # draw x axis bottom major ticks
1313+
'xtick.minor.default': [4,validate_int], #set default value for x axis minor ticks
13131314

13141315
# fontsize of the xtick labels
13151316
'xtick.labelsize': ['medium', validate_fontsize],
@@ -1332,6 +1333,7 @@ def _validate_linestyle(ls):
13321333
'ytick.minor.right': [True, validate_bool], # draw y axis right minor ticks
13331334
'ytick.major.left': [True, validate_bool], # draw y axis left major ticks
13341335
'ytick.major.right': [True, validate_bool], # draw y axis right major ticks
1336+
'ytick.minor.default': [4,validate_int], #set default value for y axis minor ticks
13351337

13361338
# fontsize of the ytick labels
13371339
'ytick.labelsize': ['medium', validate_fontsize],

lib/matplotlib/ticker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2658,9 +2658,9 @@ def __call__(self):
26582658
majorstep_no_exponent = 10 ** (np.log10(majorstep) % 1)
26592659

26602660
if np.isclose(majorstep_no_exponent, [1.0, 2.5, 5.0, 10.0]).any():
2661-
ndivs = 5
2661+
ndivs = rcParams['xtick.minor.default'] + 1
26622662
else:
2663-
ndivs = 4
2663+
ndivs = rcParams['xtick.minor.default']
26642664
else:
26652665
ndivs = self.ndivs
26662666

matplotlibrc.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@
377377
#xtick.minor.top : True ## draw x axis top minor ticks
378378
#xtick.minor.bottom : True ## draw x axis bottom minor ticks
379379
#xtick.alignment : center ## alignment of xticks
380+
#xtick.minor.default : 4 ## set default value for x axis minor ticks
380381

381382
#ytick.left : True ## draw ticks on the left side
382383
#ytick.right : False ## draw ticks on the right side
@@ -397,6 +398,7 @@
397398
#ytick.minor.left : True ## draw y axis left minor ticks
398399
#ytick.minor.right : True ## draw y axis right minor ticks
399400
#ytick.alignment : center_baseline ## alignment of yticks
401+
#ytick.minor.default : 4 ## set default value for y axis minor ticks
400402

401403
#### GRIDS
402404
#grid.color : b0b0b0 ## grid color

0 commit comments

Comments
 (0)