Image size of 1005×132589 pixels is too large. It must be less than 2^16 in each direction

Check your location variables at plt.text line in autolabel definition. I had the same problem and I found that the y variable I gave to plt.text function was too large compared to the value of my dataset of plot.

This is also an issue with plt.annotate if the location is outside the figure.

Leave a Comment