Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matplotlib set minor ticks by default "ON"

Is there any way I can set minor ticks "ON" by default, for example using "rcsettings.py" (in Enthought Python, equivalent to matplotlibrc)? I have matplotlib-1.3.1-3 installed

like image 764
jaydeepsb Avatar asked Jan 15 '14 07:01

jaydeepsb


1 Answers

Finally the problem is solved in Matplotlib version 1.5.0-1, I recently updated the matplotlib. Once you update the Matplotlib (either manually or through EPD package manager). Find the file called rcsetup.py. Usually on windows you can find it at

C:\Users\UserName\AppData\Local\Enthought\Canopy\User\Lib\site-packages\matplotlib\rcsetup.py

DO NOT edit the original file. Make a copy of the original file and rename it as OriginalRCsetup.py. Now open the file named rcsetup.py and search for line containing parameter xtick.minor.visible and edit it as True

#Leave a comment there, edited by me
'xtick.minor.visible':   [True, validate_bool],    # visiablility of the x axis minor ticks

similarly, find and edit ytick.minor.visible.

#Leave a comment there, edited by me
'ytick.minor.visible':   [True, validate_bool],    # visiablility of the x axis minor ticks

Save the file and restart the python interpreter.

like image 156
jaydeepsb Avatar answered Oct 15 '22 15:10

jaydeepsb