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:

My Code:

fig, ax = plt.subplots(figsize = (8, 3))
       linewidth = 1, color = "grey")

       linewidth = 3, color = "red")


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