Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-15 Thread Zane Selvans
Okay, so in the "variables" section, what you've got is a list of things which vary as a function of the "dimensions" listed in the previous section (time, nsr_delta, lat, lon). I don't remember which of the NetCDF file reading libraries you're using, but using Jeff's older netCDF3 interface, you

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-15 Thread JPKay
Thanks for the suggestion to look at the demo, I had missed it in my initial look through. The quiver_demo seems to be broken up into three sections. The first section initializes the information for the the two quiver plots (sections two and three). This seems like the logical place to start for

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-15 Thread Jeff Whitaker
JPKay wrote: > Hello, > > Now that I have correctly imported the NetCDF file and set up the kind of > projection I am interested in having the data displayed over I am having > trouble plotting my data with the quiver function. I am interested in > plotting the principal vectors of the stress fiel

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-15 Thread JPKay
Hello, Now that I have correctly imported the NetCDF file and set up the kind of projection I am interested in having the data displayed over I am having trouble plotting my data with the quiver function. I am interested in plotting the principal vectors of the stress field onto a Mercator proje

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-12 Thread Matthew Brett
Hi, I think you mean: >    mpl_toolkits.basemap.NetCDFFile("output.nc", mode='r', maskandscale=True, > cache=None, mmap=True, username=None, password=None, verbose=False) Note quotes round filename... Sorry, I missed those out in my previous mail. Best, Matthew --

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-12 Thread JPKay
Hello, First let me say thank you for all of the help it is very appreciated. Your suggestion to use the command import "import mpl_toolkits.basemap" has worked, but now a new problem has popped up. Does the Netcdf file need to be in the same directory as the script I am running to retrieve th

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-12 Thread Matthew Brett
Hi, On Fri, Jun 12, 2009 at 10:52 AM, JPKay wrote: > from mpl_toolkits.basemap import Basemap You have not so far imported mpl_toolkits into the namespace, only Basemap. You could do: import mpl_toolkits.basemap as another import line, or: from mpl_toolkits.basemap import Basemap, NetCDFFile

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-12 Thread JPKay
The suggestion to install matplotlib.basemap seems to be the right direction to go. However, I have been unsuccessful in importing the file by this method. This is what I have been trying. from mpl_toolkits.basemap import Basemap import numpy as np import matplotlib.pyplot as plt import matplotl

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-11 Thread Jeff Whitaker
Eric Firing wrote: > Gökhan SEVER wrote: > >> On Thu, Jun 11, 2009 at 1:09 PM, JPKay > > wrote: >> >> >> Hello, >> I am trying to use matplotlib to create a quiver plot of a NetCDF >> file with >> the extension .nc. The Netcdf file is a series o

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-11 Thread Eric Firing
Gökhan SEVER wrote: > On Thu, Jun 11, 2009 at 1:09 PM, JPKay > wrote: > > > Hello, > I am trying to use matplotlib to create a quiver plot of a NetCDF > file with > the extension .nc. The Netcdf file is a series of arrays that contain > info

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-11 Thread Gökhan SEVER
On Thu, Jun 11, 2009 at 1:09 PM, JPKay wrote: > > Hello, > I am trying to use matplotlib to create a quiver plot of a NetCDF file with > the extension .nc. The Netcdf file is a series of arrays that contain > information about the stress tensors on a globe. > > I am struggling to import the file

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-11 Thread JPKay
I was under the impression that ScientificPython.io.netCDF was outdated. I have no preference on ncdump and if there is an easier way to import the data, then I am all for it. Right now the pupynere website is down so I can't check the site for help. Thanks for the responses. Paul Anton Letne

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-11 Thread Paul Anton Letnes
In addition to scipy.io, there are some pure python netcdf readers, including pupynere (might be easier to install a pure python module?). Also, you have ScientificPython.io.netCDF, in case this is more convenient for you. ncdump is almost certainly not the way to go, it is best suited for human in

Re: [Matplotlib-users] Quiver plot of a netcdf file

2009-06-11 Thread Matthew Brett
Hi, > I am struggling to import the file into python and having the quiver data > show up. > To import the file I have been using: > “ncdump file.nc” scipy.io has netcdf reading - it just uses a copy of http://pypi.python.org/pypi/pupynere/ Best, Matthew ---

[Matplotlib-users] Quiver plot of a netcdf file

2009-06-11 Thread JPKay
Hello, I am trying to use matplotlib to create a quiver plot of a NetCDF file with the extension .nc. The Netcdf file is a series of arrays that contain information about the stress tensors on a globe. I am struggling to import the file into python and having the quiver data show up. To import th