Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

integer xticks

import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
#...
ax = plt.figure().gca()
#...
ax.xaxis.set_major_locator(MaxNLocator(integer=True))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #integer #xticks
ADD COMMENT
Topic
Name
7+1 =