You can use the MaxNLocator
method, like so:
from pylab import MaxNLocator
ya = axes.get_yaxis()
ya.set_major_locator(MaxNLocator(integer=True))
More Related Contents:
- matplotlib/seaborn: first and last row cut in half of heatmap plot
- Annotate bars with values on Pandas bar plots
- How to get different colored lines for different plots in a single figure?
- multiple axis in matplotlib with different scales [duplicate]
- How to maximize a plt.show() window using Python
- Plot a horizontal line on a given plot
- What is the difference between ‘log’ and ‘symlog’?
- How to have clusters of stacked bars
- python matplotlib framework under macosx?
- Paging/scrolling through set of 2D heat maps in matplotlib
- PyPlot move alternative y axis to background
- Inline animations in Jupyter
- How to use custom png image marker with plot?
- Representing voxels with matplotlib
- Modify the legend of pandas bar plot
- How to deal with NaN values when plotting a boxplot
- update frame in matplotlib with live camera preview
- Changing the tick frequency on the x or y axis
- How to make several plots on a single page using matplotlib?
- Labeling boxplot in seaborn with median value
- Plotting time in with Matplotlib
- Getting vertical gridlines to appear in line plot in matplotlib
- Show the values in the grid using matplotlib
- Embed a matplotlib plot in a pyqt5 gui
- Plot a 3d pulse propagation
- How to change the color of the axis, ticks and labels
- Changing the color of an axis
- Problem in combining bar plot and line plot
- Image overlay in 3d plot
- Plot all pandas dataframe columns separately