0

I want to analyze the performance of some stock market index, say for instance CAC 40, and I have downloaded its historical data from here (https://finance.yahoo.com/quote/%5EFCHI/history/)

I have created a data frame, and did some other necessary operations, and have finally plotted it and it looks like this:

enter image description here

This data covers 1990 to 2020, and the data format (which is also the index) is 'YYYY-MM-DD', but I want the x-axis to be of the format [1990, 1992, 1994, ..., 2020]. How can I do that?

I appreciate any helpful comment.

P.S: Let me add that I want all the data to be in the chart, i.e., all the 7967 data points, but I only want biennial points on the x-axis, for instance 1990-03-01 then 1992-03-01, with the exception that only the year is printed, not the month and day.

Mahsa Z
  • 3
  • 3
  • Does this answer your question? [Pandas bar plot changes date format](https://stackoverflow.com/questions/30133280/pandas-bar-plot-changes-date-format) – Stef Jan 04 '21 at 09:30
  • 1
    Does this answer your question? [Matplotlib DateFormatter for axis label not working](https://stackoverflow.com/questions/33743394/matplotlib-dateformatter-for-axis-label-not-working) – Mr. T Jan 04 '21 at 09:52

0 Answers0