0

When I run the following code:

fig, ax = plt.subplots()
ax.quiver(np.zeros(5), np.arange(5), np.ones(5), np.ones(5))
plt.savefig('test', bbox_inches = 'tight')

Things save fine.

But when I turn clipping off on the quiver plot...

fig, ax = plt.subplots()
ax.quiver(np.zeros(5), np.arange(5), np.ones(5), np.ones(5), clip_on = False)
plt.savefig('test', bbox_inches = 'tight')

I get the following error: ValueError: Image size of 684x260469 pixels is too large. It must be less than 2^16 in each direction.

What's going on here?

hm8
  • 1,381
  • 3
  • 21
  • 41
  • I get the error regardless of whether I use `bbox_inches` or not... Probably relevant commentary [here](https://matplotlib.org/api/_as_gen/matplotlib.artist.Artist.set_clip_on.html#matplotlib.artist.Artist.set_clip_on). – BigBen Jun 16 '20 at 18:17
  • Weird, I only get the error if I use bbox_inches. I'm using Spyder with interactive plotting turned on... – hm8 Jun 16 '20 at 18:21
  • Also using Spyder... just a simple `plt.show()` fails, as does `plt.savefig`. – BigBen Jun 16 '20 at 18:23

0 Answers0