Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imshow size limitation #2105

Closed
NeedAName opened this issue May 31, 2013 · 10 comments
Closed

imshow size limitation #2105

NeedAName opened this issue May 31, 2013 · 10 comments

Comments

@NeedAName
Copy link

imshow() and matshow() fail to display matrices larger than 2^15 in horizontal dimension,
e.g.:
M = np.ones((100,100000))
plt.imshow(M, cmap='jet', aspect='auto', alpha = 1, origin = 'lower', interpolation = 'none')
plt.show()

matplotlib 1.2.1,
ubuntu gnome 12.10

@tacaswell
Copy link
Member

I have also had issues with this.

On the other hand, one should ask why you are displaying something several orders of magnitude wider than your screen.

@dmcdougall
Copy link
Member

@NeedAName @tacaswell Is there an error message?

I've run into size limitations with Agg, but I get an error message telling me what the problem is. I can understand writing a big image file to disk rather than displaying on the screen.

@tacaswell
Copy link
Member

No error that I see (doing this interactively). Parts or all of the image just don't show up.

If you zoom in on a small region, it behaves as expected.

@mdboom
Copy link
Member

mdboom commented Jun 24, 2013

Which backend is failing for the OP @NeedAName or @tacaswell ?

@tacaswell
Copy link
Member

qt4agg (pysides)

@pelson
Copy link
Member

pelson commented Aug 12, 2013

Do you really want to show an image which is 100000 pixels wide? I'm guessing you don't have a monitor which is capable of displaying each pixel.

Is it that you really want to make use of some downsampling algorithm first? I've been working on a bit of an example demonstrating the use of lazy arrays and sending them over to a matplotlib image for fast, lazy, subsampling. This would allow for zoomed in images of arbitrary size (I've been testing with 52428 ** 2 pixels) to be drawn without destroying a conventional machine... is that the kind of thing you are after?

@tacaswell
Copy link
Member

In my data each column is a time step and I have interesting features at the 100, 1,000, and 10,000 time scales so I am using this to a) very inefficiently down-sample my data for display by letting the rasterization code do it and b) easy data-exploration.

The lazy array example sounds exactly like what I want to use this for.

@mdboom
Copy link
Member

mdboom commented Aug 12, 2013

@pelson: That lazy array example sounds really nice to have. I wouldn't want this to hold up inclusion of something like that, but we should look to that to perhaps influence MEP18 about "plottable objects" and how or if we would create an abstract interface to a more dynamic interface to the data. (I'm basically just noting this for myself or someone else when they get around to writing MEP18).

@petehuang
Copy link
Contributor

Reconfirming on 1.5.3 and TkAgg

@tacaswell tacaswell modified the milestones: 2.2 (next next feature release), 2.1 (next point release) Aug 29, 2017
@dstansby
Copy link
Member

The original code snipped seems to work fine for me on both macosx and Qt5Agg backends, so closing. If this is still an issue with a recent release, please re-open or post a comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants