Answers for "restrict ticks to integers matplotlib"

0

restrict ticks to integers matplotlib

from pylab import MaxNLocator

    ya = axes.get_yaxis()
    ya.set_major_locator(MaxNLocator(integer=True))
Posted by: Guest on June-17-2021

Python Answers by Framework

Browse Popular Code Answers by Language