2

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
  • 7,018
  • 15
  • 52
  • 68
  • http://stackoverflow.com/questions/6682784/how-to-reduce-number-of-ticks-with-matplotlib – Alex Mar 09 '15 at 16:15

1 Answers1

2

Use the set_ticks function

from matplotlib import pyplot as plt

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