Re: [Matplotlib-users] plotting large images

2013-08-28 Thread Štěpán Turek
Hi Chris, " I've used some hacky tricks to get around this, which mostly involve downsampling the image on the fly based on screen resolution. One such effort is at https://github.com/ChrisBeaumont/mpl-modest-image (https://github.com/ChrisBeaumont/mpl-modest-image). " I tried your code

Re: [Matplotlib-users] plotting large images

2013-08-28 Thread Štěpán Turek
Hi Martin, "Hi, I knw you asked for memory profiling but I could not resist and did CPU profiling on your testcase. I have attached some screenshots and in words: " thanks for these tips about profiling.  Stepan ---

Re: [Matplotlib-users] plotting large images

2013-08-27 Thread Štěpán Turek
" "" You could look at whether or not you actually need 64-bit precision. Often times, 8-bit precision per color channel is justifiable, even in grayscale. My advice is to play with the dtype of your array or, as you mentioned, resample. " thanks, this helped me significantly,  uint

Re: [Matplotlib-users] plotting large images

2013-08-27 Thread Štěpán Turek
Hi, " You could, before plotting, sum the different image arrays? Depending on whether you are plotting RGB(A) images or greyscale images, you could take the sum of the color channels, or take a weighted average. " Yes, I will probably merge the images (RGBA) before plotting. I want to

[Matplotlib-users] plotting large images

2013-08-27 Thread Štěpán Turek
Hi, I would like to plot multiple overlayed 4096x4096 images in one axes. If I run this code the plot takes 300 MB of memory: import numpy as np import matplotlib.pyplot as plt if __name__ == '__main__':     img = np.zeros((4096, 4096))     img[100: 300, 100:1500] = 200     imgplo