0

I have a pandas.core.series.Series data with its indices starting at '2000-01-03' and ending at '2013-12-31'. Example of the first 15 data points is follows

Date
2000-01-03    111.937502
2000-01-04    102.500003
2000-01-05    103.999997
2000-01-06     94.999998
2000-01-07     99.500001
2000-01-10     97.750001
2000-01-11     92.750000
2000-01-12     87.187503
2000-01-13     96.749998
2000-01-14    100.437499
2000-01-18    103.937499
2000-01-19    106.562499
2000-01-20    113.499994
2000-01-21    111.312501
2000-01-24    106.250002
Name: data, dtype: float64

When I plot the data in Jupyterlab

plt.plot(data, color='blue')
plt.xticks(rotation=45)

The tick marks and their labels are just displayed in thick black blocks due to overlapping. How can I specify the intervals between the displayed tick marks as x days to prevent overlapping so that the x-axis could be readable? Thank you!

Nemo
  • 1,124
  • 2
  • 16
  • 39
  • if you use the built-in plotting functions for pandas, it makes plotting with dates on the index much easier. try `data.rename(pd.to_datetime).plot()` – Ouyang Ze Jun 29 '19 at 14:54
  • There should be a minorticks_off() call on the plot object or something like that – sramalingam24 Jun 29 '19 at 14:54

0 Answers0