[Matplotlib-users] matplotlib error on trying to use moviewriter

2014-09-09 Thread partha
Dear All, I am using Python 3.4.1 on Debian. Matplotlib works fine for me, but when I try to save the animation using moviewriter I get error. My program file: ** short test program** #!/usr/bin/env python3 from matplotlib import animat

Re: [Matplotlib-users] Plotting large file (NetCDF)

2014-09-09 Thread Raffaele Quarta
Hi Ben and Ryan, I will try to figure out as it works. Thank you. Regards, Raf -Original Message- From: ben.v.r...@gmail.com on behalf of Benjamin Root Sent: Tue 9/9/2014 3:25 PM To: Ryan Nelson Cc: Raffaele Quarta; Matplotlib Users Subject: Re: [Matplotlib-users] Plotting large fil

Re: [Matplotlib-users] Plotting large file (NetCDF)

2014-09-09 Thread Benjamin Root
Most of the time, you will not need to use meshgrid. Take advantage of numpy's broadcasting feature: http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html It saves *significantly* on memory and processing time. Most of Matplotlib's plotting functions work well with broadcastable inputs, so

Re: [Matplotlib-users] Plotting large file (NetCDF)

2014-09-09 Thread Ryan Nelson
Raffaele, As Ben pointed out, you might be creating a lot of in memory Numpy arrays that you probably don't need/want. For example, I think (?) slicing all of the variable below: lons = fh.variables['lon'][:] is making a copy of all that (mmap'ed) data as a Numpy array in memory. Get rid of the s

Re: [Matplotlib-users] Plotting large file (NetCDF)

2014-09-09 Thread Raffaele Quarta
Hi Jody and Ben, thanks for your answers. I tried to use pcolormesh instead of pcolor and the result is very good! For what concern with the memory system problem, I wasn't able to solve it. When I tried to use the bigger file, I got the same problem. Attached you will find the script that I'm