Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

restrict ticks to integers matplotlib

    from pylab import MaxNLocator

    ya = axes.get_yaxis()
    ya.set_major_locator(MaxNLocator(integer=True))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #restrict #ticks #integers #matplotlib
ADD COMMENT
Topic
Name
3+7 =