Assistance Required( Story telling Data Visualization Exchange Rate Guided Project)

<<Learn data science with Python and R projects

Need help understanding how to use the get_xticks and get_yticks in my code.

below is the suggested correction recommended to help solve ValueError: Image size of AxB pixels is too large

Unfortunately, the x-coordinates (behind the datetime units) are not fixed in matplotlib (to fix them, you’d need a slightly more complicated coding approach), so the solution here is to use ax.get_xticks() and ax.get_yticks() to see what are the coordinates and then adjust your input coordinates accordingly.

Currently,I am unable to use the ax.text() method due to the inability for me to specific the x coordinate.

I assumed my x coordinates range from 2001 to 2021 (the coordinates used to plot my graphs) but it doesnt work when I try to set the text position with them.

Hi, @frimstheshrimp, let me know if this answer helps you:

am still not understanding the concept .

i used the ax.get_xticks() and ax.get_yticks() as indicated before the graph and it enabled me to see the x and y coordinates as indicated.

however when I use it in my code to add any text using ax.text() , no error is indicated but the graph disappears.

nb. without adding any ax.text() to my plots for all graphs ,I am able to see the graph(

) but once I add any ax.text() which uses coordinates, the graph disappears .Screenshot (1422)

Please ignore the previous message. I have identified my mistake with the ax.get_xtick() and ax.get_yticks() now.

Each ax has its own x and y coordinates, so I was suppose to get the axis for each individually ie coordinates for ax1 is different for ax2.



Thanks :pray: this comment saved me. I was doing the same mistake and was getting really frustrated.