Skip to content Skip to sidebar Skip to footer

Python Matplotlib Axis Is Blank For Date With Trend Line

I can correctly plot a trendline with price data but the both X Y axis of date formatting is blank. I am not sure what is messing up this plot configuration for the axis. Here is t

Solution 1:

Update: I found the source of your problem.

In addition to the below problem you incorrectly copied the answer to the linked question.

You wrote: ax.yaxis.set_major_formatter(mtick.FormatStrFormatter('%3.4f')) You need: ax.yaxis.set_major_formatter(FormatStrFormatter('%3.4f'))

See updated graph:

https://imgur.com/a/Rv

Post a Comment for "Python Matplotlib Axis Is Blank For Date With Trend Line"