Reputation: 75
I am trying to define a style in a matplotlibrc file which only shows grids on the y axis. If I do the following
axis.grid: True
both, the x and y axis will have grid.Is there a way of doing something like:
axis.Yaxis: True
I did not find anything like that in the documentation.
I am using Python 3.4
Upvotes: 3
Views: 1102
Reputation: 339795
There is no rc parameter to change the grid on each axis individually. However you may turn only activate it for one specific axes
Options are to set the grid on globally and turn it off for the x axis
plt.rcParams["axes.grid"] =True
plt.rcParams["axes.grid.axis"] ="y"
or in the matplotlib rc file:
axes.grid.axis : y
axes.grid : True
Upvotes: 2