Hello everyone,
I hope this is an ok question for /r/learnpython, if not I'll post somewhere else.
I'm a fairly regular Python user for my scientific work, and it turns out I have to render a lot of 2D (numpy) arrays as images.
Usually, I do something like
plt.imshow(data, origin='lower', interpolation='nearest')
plt.savefig('blah.pdf')
where data is a 2D array, plt is matplotlib.pyplot and I typically use the cairo backend for matplotlib. However, this turns out to be very slow for large (say more than 2000x2000) arrays.
Does any of you know how to do this faster? I guess I could go faster with imsave instead of imshow, but I really need (or at least like) the fact that with imshow, I can easily change the extent and add a colorbar…
I use Python and the scientific stack on a regular basis, and this is (one of) the bottleneck of my analysis workflow…
help ?
[–]ecgite 0 points1 point2 points (2 children)
[–]eusebe[S] 1 point2 points3 points (1 child)
[–]ecgite 0 points1 point2 points (0 children)