Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
On my machine, imshow uses 3.5 GB of RAM at peak during its plotting process for a 385 MB array, even if this array is already a float64. Nearly 10x the RAM required for just the data alone. Once the plot is finished, it goes significantly. Is this a bug, or is this just how it is?
I cannot simply downsample because I would like to show the user the image at its true size, but allow them to scroll around to different parts via the scrollbars. Is there any approach someone can suggest to do this without having to have 10x the RAM?
Here is a minimal example via pyplot that reproduces this issue exactly; I used task manager to measure the RAM usage.
`import matplotlib.pyplot as plt
import numpy as np
img = np.random.rand(3000, 16024, dtype='float64')
imgplot = plt.imshow(img)
plt.show()`
Python 2.7 and 3.4
matplotlib 1.5.1 (installed via pip)
Using tkagg backend.
Windows 7