3

I am wondering how to can change the number of bins in a line plot in matplotlin python pandas? like if my x axis range is [0,1000] and I want it be decided to 200 ticks. Can anybody help?

UserYmY
  • 8,034
  • 17
  • 57
  • 71
  • http://stackoverflow.com/questions/6682784/how-to-reduce-number-of-ticks-with-matplotlib – Alex Mar 09 '15 at 16:15

1 Answers1

3

Use the set_ticks function

from matplotlib import pyplot as plt

fig, ax = plt.subplots()
ax.set_xticks([0,200,400,800,1000])
user3590169
  • 396
  • 2
  • 4