Guided Project: Storytelling Data Visualization on Exchange Rates. Problem with Image size

Hello everyone! I was doing my Matplotlib visualization project, but I got stuck on one of the problems when I was trying to plot the first example that was given in the project
Screen Link:
https://app.dataquest.io/c/96/m/529/guided-project%3A-storytelling-data-visualization-on-exchange-rates/6/coding-the-graph

My Code:

style.use("fivethirtyeight")
fig, ax = plt.subplots(figsize = (8, 3))
ax.plot(financial_crisis["Time"],
       financial_crisis["rolling_mean"],
       linewidth = 1, color = "grey")

ax.plot(financial_crisis_2007_2009["Time"],
       financial_crisis_2007_2009["rolling_mean"],
       linewidth = 3, color = "red")

ax.set_yticklabels([])
ax.set_xticklabels([])


for year in ['2006', '2007', '2008', '2009', "2010"]:
    ax.text(x, 1.13, year, alpha = 0.5, 
            fontsize = 11)
    x += 365

What I expected to happen:
By running this code I expected to add labels for my X-axis

What actually happened:
It doesn’t give me anything, but the value error

ValueError: Image size of 225059x204 pixels is too large. It must be less than 2^16 in each direction.

<!--Enter other details below: -->

Can you help me to find the solutions? Also, I am curious how we find the coordinates for the X and Y-axis. Is there any specific way to locate it or does it come with trial and error? How do we find the resolution of the graph to make our trials more accurate?

Thank you so much for your invaluable help!

Hi @baurzhanmakhambet

these posts might prove helpful.

1 Like