[Matplotlib-users] Multiple Y Axes redux

2010-03-08 Thread Alex S

Hi there,
I know this has been discussed in the past, but I was looking through some
of the history and I'm not sure what the exact situation is.  I think
multiple y axes on the same side of the graph is unsupported officially, but
can be hacked together somehow, is that right?  Is there an example of such
a hacked together method somewhere that I could look at?

There may be a simpler way to do what I'm trying to do...  I'm not trying to
make several different axes, I'm trying to have a logarithmic axis on the
left, but have three different scales (ie 1, 10, 100 on one, 10, 100, 1000
on another, 100, 1000, 1 on the final one).  Is there a way to manually
label the ticks on the axis "1 10  1000" and so on?  I think that
might do in a pinch, then I could just divide the plotted values by the
correct scaling factor.  Do you guys think that would be the way to go?  And
if that is possible, is it possible to have the tick labels be different
colours for the different numbers so it shows which scale is for which line
on the graph?  I guess I'm not hopeful for that...  Instead could I put in a
bit at the bottom of the graph to highlight which markers go to which axis? 
Something like this (for x, o and * data markers on the chart):

|  |  |
|  |  |
|  |  |_*
|  |_o
|_x

Thanks a lot, sorry if this question is kind of hard to follow...  Please
let me know if more clarification is needed!

Alex
-- 
View this message in context: 
http://old.nabble.com/Multiple-Y-Axes-redux-tp27817369p27817369.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] shiftgrid 'cyclic point not included' error

2010-03-08 Thread antonv

Hi all,

I am getting a 'cyclic point not included' error using shiftgrid on a grib
file from NOAA. I've checked and it seems that the file has the lons from 0
to 359.5 every .5 degree but I get that error whenever I try to run this. 

What I need to achieve is to shift the grid from 0 / 360 to -180 / 180 so
that I can create a map over Great Britain. I am using a Cassini projection.

Thanks,
Anton
-- 
View this message in context: 
http://old.nabble.com/shiftgrid-%27cyclic-point-not-included%27-error-tp27819848p27819848.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] shiftgrid 'cyclic point not included' error

2010-03-08 Thread Jeff Whitaker
antonv wrote:
> Hi all,
>
> I am getting a 'cyclic point not included' error using shiftgrid on a grib
> file from NOAA. I've checked and it seems that the file has the lons from 0
> to 359.5 every .5 degree but I get that error whenever I try to run this. 
>
> What I need to achieve is to shift the grid from 0 / 360 to -180 / 180 so
> that I can create a map over Great Britain. I am using a Cassini projection.
>   

Anton:  You can add the wraparound, or cyclic point using the addcyclic 
function.  Or, you can update to the latest svn version of basemap which 
does not have this restriction.


-Jeff


-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] shiftgrid 'cyclic point not included' error

2010-03-08 Thread antonv

Hi Jeff,

Thanks for the quick reply! I've updated to the latest shiftgrid and now I
get the chart :D
I still have a small issue as there is a half degree sliver missing from the
mapping at the greenwich meridian. Any idea how to solve that issue? 

Here is an image showing that (above england):
http://old.nabble.com/file/p27824785/Global-HTSGW_DIRPW-0.png 

Thanks,
Anton


Jeff Whitaker wrote:
> 
> antonv wrote:
>> Hi all,
>>
>> I am getting a 'cyclic point not included' error using shiftgrid on a
>> grib
>> file from NOAA. I've checked and it seems that the file has the lons from
>> 0
>> to 359.5 every .5 degree but I get that error whenever I try to run this. 
>>
>> What I need to achieve is to shift the grid from 0 / 360 to -180 / 180 so
>> that I can create a map over Great Britain. I am using a Cassini
>> projection.
>>   
> 
> Anton:  You can add the wraparound, or cyclic point using the addcyclic 
> function.  Or, you can update to the latest svn version of basemap which 
> does not have this restriction.
> 
> 
> -Jeff
> 
> 
> -- 
> Jeffrey S. Whitaker Phone  : (303)497-6313
> Meteorologist   FAX: (303)497-6449
> NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
> 325 BroadwayOffice : Skaggs Research Cntr 1D-113
> Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg
> 
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/shiftgrid-%27cyclic-point-not-included%27-error-tp27819848p27824785.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] shiftgrid 'cyclic point not included' error

2010-03-08 Thread Jeff Whitaker
antonv wrote:
> Hi Jeff,
>
> Thanks for the quick reply! I've updated to the latest shiftgrid and now I
> get the chart :D
> I still have a small issue as there is a half degree sliver missing from the
> mapping at the greenwich meridian. Any idea how to solve that issue? 
>
> Here is an image showing that (above england):
> http://old.nabble.com/file/p27824785/Global-HTSGW_DIRPW-0.png 
>
> Thanks,
> Anton
>   

Anton:  Looks like the values at the Greenwich meridian got messed up 
somehow.  Can you post your script somewhere so I can try it out?

-Jeff
>
> Jeff Whitaker wrote:
>   
>> antonv wrote:
>> 
>>> Hi all,
>>>
>>> I am getting a 'cyclic point not included' error using shiftgrid on a
>>> grib
>>> file from NOAA. I've checked and it seems that the file has the lons from
>>> 0
>>> to 359.5 every .5 degree but I get that error whenever I try to run this. 
>>>
>>> What I need to achieve is to shift the grid from 0 / 360 to -180 / 180 so
>>> that I can create a map over Great Britain. I am using a Cassini
>>> projection.
>>>   
>>>   
>> Anton:  You can add the wraparound, or cyclic point using the addcyclic 
>> function.  Or, you can update to the latest svn version of basemap which 
>> does not have this restriction.
>>
>>
>> -Jeff
>>
>>
>> -- 
>> Jeffrey S. Whitaker Phone  : (303)497-6313
>> Meteorologist   FAX: (303)497-6449
>> NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
>> 325 BroadwayOffice : Skaggs Research Cntr 1D-113
>> Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg
>>
>>
>> --
>> Download Intel® Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>> 
>
>   


-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] shiftgrid 'cyclic point not included' error

2010-03-08 Thread antonv

Hi Jeff,

Here is the whole script: 
http://old.nabble.com/file/p27826457/_test_shiftgrid.py _test_shiftgrid.py 
And here are the grib data files:
http://socalscubainfo.com/downloads/GRIB2_files.zip

Also, if there is not too much to ask, is there a sample anywhere that shows
how to use shiftgrid for a mercator projection? If you look at the script, I
was initially trying to make the images using the mercator projection (there
is a commented basemap function there) but it would display just the data
starting from the origin. I was wondering how would I be able to display
let's say the whole globe but shift the grid 180 so that great britain would
be in the center of the map rather than being cut at the edge.

Thanks,
Anton 




Jeff Whitaker wrote:
> 
> antonv wrote:
>> Hi Jeff,
>>
>> Thanks for the quick reply! I've updated to the latest shiftgrid and now
>> I
>> get the chart :D
>> I still have a small issue as there is a half degree sliver missing from
>> the
>> mapping at the greenwich meridian. Any idea how to solve that issue? 
>>
>> Here is an image showing that (above england):
>> http://old.nabble.com/file/p27824785/Global-HTSGW_DIRPW-0.png 
>>
>> Thanks,
>> Anton
>>   
> 
> Anton:  Looks like the values at the Greenwich meridian got messed up 
> somehow.  Can you post your script somewhere so I can try it out?
> 
> -Jeff
>>
>> Jeff Whitaker wrote:
>>   
>>> antonv wrote:
>>> 
 Hi all,

 I am getting a 'cyclic point not included' error using shiftgrid on a
 grib
 file from NOAA. I've checked and it seems that the file has the lons
 from
 0
 to 359.5 every .5 degree but I get that error whenever I try to run
 this. 

 What I need to achieve is to shift the grid from 0 / 360 to -180 / 180
 so
 that I can create a map over Great Britain. I am using a Cassini
 projection.
   
   
>>> Anton:  You can add the wraparound, or cyclic point using the addcyclic 
>>> function.  Or, you can update to the latest svn version of basemap which 
>>> does not have this restriction.
>>>
>>>
>>> -Jeff
>>>
>>>
>>> -- 
>>> Jeffrey S. Whitaker Phone  : (303)497-6313
>>> Meteorologist   FAX: (303)497-6449
>>> NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
>>> 325 BroadwayOffice : Skaggs Research Cntr 1D-113
>>> Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg
>>>
>>>
>>> --
>>> Download Intel® Parallel Studio Eval
>>> Try the new software tools for yourself. Speed compiling, find bugs
>>> proactively, and fine-tune applications for parallel performance.
>>> See why Intel Parallel Studio got high marks during beta.
>>> http://p.sf.net/sfu/intel-sw-dev
>>> ___
>>> Matplotlib-users mailing list
>>> Matplotlib-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>> 
>>
>>   
> 
> 
> -- 
> Jeffrey S. Whitaker Phone  : (303)497-6313
> Meteorologist   FAX: (303)497-6449
> NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
> 325 BroadwayOffice : Skaggs Research Cntr 1D-113
> Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg
> 
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/shiftgrid-%27cyclic-point-not-included%27-error-tp27819848p27826457.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Making an Axis Label like a legend

2010-03-08 Thread Alex S

Hello again,
I've got a question about axis labels, specifically y axis labels for
multiple lines.  What I'd ideally like to do is take something like the
legends shown in the attached picture, rotate them 90 degrees counter
clockwise, then stick them to the left of the Y axes to use it as a label
there.  I don't think there is any way to rotate the legend, but is there
anything I could do to get a similar effect?  Basically I'd like the legend
out of the plot area and into the y axis title, but it needs to show which
line is which.  Having the sample line and marker in the title would be
perfect, but I guess just having the words in the corresponding colour would
work too.

Thanks a lot!
Alex
http://old.nabble.com/file/p27826934/test.png 
-- 
View this message in context: 
http://old.nabble.com/Making-an-Axis-Label-like-a-legend-tp27826934p27826934.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2010-03-08 Thread gely


Christopher Barker wrote:
> 
> Erik Schweller wrote:
>> My overall goal is to generate contour plots for a wide range of input
>> data.  The data points are not regularly spaced and do not align to
>> any grid.  The data points represent measurements taken from a model
>> that can take on a variety of shapes.  To make matters more difficult,
>> I'd prefer not to interpolate around corners of the model.
> 
> It strikes me that when you are working with unstructured data like 
> this, it may be better to keep it unstrucured -- do the delanauy 
> triangulation and directly contour from that. It's actually prety easy 
> to contour a triangular mesh.
> 
> Unfortunately, I haven't see code to do it in scipy or MPL. Am I wrong? 
> Is there something there. If not, there really should be it seems a bit 
> silly to shoehorn your data to a rectangular grid just to contour it.
> 
> I suppose NN interpolation is essentially doing this already, but it 
> introduces issues with a boundary that doesnt' line up to a rectangular 
> grid.
> 
> As I think about it, I'm going to have to write code to do this (contour 
> an unstructured triangular mesh) sometime soon, so please let me know if 
> it does exist already -- if not I'll try to remember to contribute it 
> when I get around to it.
> 
> -Chris
> 

Chris, I found this old thread. Did you ever find code to directly
interpolate a triangulation? I need to do the same thing.

Thanks,
Geoff

--
Geoffrey Ely
g...@usc.edu
http://earth.usc.edu/~gely/
Department of Earth Sciences
University of Southern California
Los Angeles, CA 90089-0740

-- 
View this message in context: 
http://old.nabble.com/Contour-Plotting-of-Varied-Data-on-a-Shape-tp25089018p27826931.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] contourf doesn't like a rectangular grid

2010-03-08 Thread Shrividya Ravi
Hi there,
I think I made a mistake with putting in a tuple in my first email, but here
is the error output from the contourf that I call within a script. I use
this script before with a square grid and there is no problem. Anyway, after
your email, I played with the script again and I think I have a problem with
reshaping the 'z' data. For some reason, the 'z' data is not shaped the same
as the meshgrid. I will try and sort it out..

Many thanks for all your help!
Shrividya

TypeError Traceback (most recent call last)

/media/ANAMIKA/crashing out Raman/script_7-03-10_co1_G-mode_spatial_map.py
in ()
 31
 32 ## This part plots the contour plot and configures all the visual
aspects.

---> 33 pylab.contourf(map_XX, map_YY, d)
 34 pylab.colorbar()
 35 pylab.xlim(min(map_x), max(map_x))

/usr/lib/pymodules/python2.6/matplotlib/pyplot.pyc in contourf(*args,
**kwargs)
   1874 ax.hold(hold)
   1875 try:
-> 1876 ret = ax.contourf(*args, **kwargs)
   1877 draw_if_interactive()
   1878 finally:

/usr/lib/pymodules/python2.6/matplotlib/axes.pyc in contourf(self, *args,
**kwargs)
   6816 if not self._hold: self.cla()
   6817 kwargs['filled'] = True
-> 6818 return mcontour.ContourSet(self, *args, **kwargs)
   6819 contourf.__doc__ = mcontour.ContourSet.contour_doc
   6820

/usr/lib/pymodules/python2.6/matplotlib/contour.pyc in __init__(self, ax,
*args, **kwargs)
572 raise ValueError('Either colors or cmap must be None')
573 if self.origin == 'image': self.origin =
mpl.rcParams['image.origin']
--> 574 x, y, z = self._contour_args(*args)# also sets
self.levels,
575#  self.layers

576 if self.colors is not None:

/usr/lib/pymodules/python2.6/matplotlib/contour.pyc in _contour_args(self,
*args)
761 x, y = self._initialize_x_y(z)
762 elif Nargs <=4:
--> 763 x,y,z = self._check_xyz(args[:3])
764 else:
765 raise TypeError("Too many arguments to %s; see help(%s)"
% (fn,fn))

/usr/lib/pymodules/python2.6/matplotlib/contour.pyc in _check_xyz(self,
args)
742 return x,y,z
743 if x.ndim != 1 or y.ndim != 1:
--> 744 raise TypeError("Inputs x and y must be 1D or 2D.")
745 nx, = x.shape
746 ny, = y.shape

TypeError: Inputs x and y must be 1D or 2D.
WARNING: Failure executing file: 
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Mysterious "ValueError: zero-size array..."

2010-03-08 Thread David Goldsmith
--- On Fri, 3/5/10, David Goldsmith  wrote:

> --- On Fri, 3/5/10, Friedrich Romstedt 
> wrote:
> 
> > NB: You lose at most 3 pixels at the border of your
> image
> > when drawing
> > it the method you proposed, because the int floor'ing
> will
> > cause that.
> 
> if you can show me how to avoid
> it, I'd be much appreciative).

Friedrich: thanks for all your help over on the NumPy list.

For some reason I don't seem to be getting emails from this list, so if anyone 
replied to the query above, I didn't get it; perhaps you could reply off list?  
Thanks!

DG


  

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] shiftgrid 'cyclic point not included' error

2010-03-08 Thread Jeff Whitaker
antonv wrote:
> Hi Jeff,
>
> Here is the whole script: 
> http://old.nabble.com/file/p27826457/_test_shiftgrid.py _test_shiftgrid.py 
> And here are the grib data files:
> http://socalscubainfo.com/downloads/GRIB2_files.zip
>
> Also, if there is not too much to ask, is there a sample anywhere that shows
> how to use shiftgrid for a mercator projection? If you look at the script, I
> was initially trying to make the images using the mercator projection (there
> is a commented basemap function there) but it would display just the data
> starting from the origin. I was wondering how would I be able to display
> let's say the whole globe but shift the grid 180 so that great britain would
> be in the center of the map rather than being cut at the edge.
>
> Thanks,
> Anton 
>   

Anton:  You weren't updating the lons and lats to be consistent with the 
shifted grid.  I changed the lines

#z, lons[i] = shiftgrid(180.0, z, lons[i], start=False, 
cyclic=360.0)
#zq, lons_a[i] = shiftgrid(180.0, zq, lons_a[i], start=False, 
cyclic=360.0)

in your script to

lons1 = lons[0,:]
z, lonsnew = shiftgrid(180.0, z, lons1, start=False)
zq, lonsnew = shiftgrid(180.0, zq, lons1, start=False)
lons, lonsnew = shiftgrid(180.0, lons, lons1, start=False)
lats, lonsnew = shiftgrid(180.0, lats, lons1, start=False)

and it works fine.

-Jeff
>
>
>
> Jeff Whitaker wrote:
>   
>> antonv wrote:
>> 
>>> Hi Jeff,
>>>
>>> Thanks for the quick reply! I've updated to the latest shiftgrid and now
>>> I
>>> get the chart :D
>>> I still have a small issue as there is a half degree sliver missing from
>>> the
>>> mapping at the greenwich meridian. Any idea how to solve that issue? 
>>>
>>> Here is an image showing that (above england):
>>> http://old.nabble.com/file/p27824785/Global-HTSGW_DIRPW-0.png 
>>>
>>> Thanks,
>>> Anton
>>>   
>>>   
>> Anton:  Looks like the values at the Greenwich meridian got messed up 
>> somehow.  Can you post your script somewhere so I can try it out?
>>
>> -Jeff
>> 
>>> Jeff Whitaker wrote:
>>>   
>>>   
 antonv wrote:
 
 
> Hi all,
>
> I am getting a 'cyclic point not included' error using shiftgrid on a
> grib
> file from NOAA. I've checked and it seems that the file has the lons
> from
> 0
> to 359.5 every .5 degree but I get that error whenever I try to run
> this. 
>
> What I need to achieve is to shift the grid from 0 / 360 to -180 / 180
> so
> that I can create a map over Great Britain. I am using a Cassini
> projection.
>   
>   
>   
 Anton:  You can add the wraparound, or cyclic point using the addcyclic 
 function.  Or, you can update to the latest svn version of basemap which 
 does not have this restriction.


 -Jeff


 -- 
 Jeffrey S. Whitaker Phone  : (303)497-6313
 Meteorologist   FAX: (303)497-6449
 NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
 325 BroadwayOffice : Skaggs Research Cntr 1D-113
 Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


 --
 Download Intel® Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


 
 
>>>   
>>>   
>> -- 
>> Jeffrey S. Whitaker Phone  : (303)497-6313
>> Meteorologist   FAX: (303)497-6449
>> NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
>> 325 BroadwayOffice : Skaggs Research Cntr 1D-113
>> Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg
>>
>>
>> --
>> Download Intel® Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>> 
>
>   


-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web

Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2010-03-08 Thread Christopher Barker
gely wrote:
>> As I think about it, I'm going to have to write code to do this (contour 
>> an unstructured triangular mesh) sometime soon, so please let me know if 
>> it does exist already -- if not I'll try to remember to contribute it 
>> when I get around to it.
>>
>> -Chris
>>
> 
> Chris, I found this old thread. Did you ever find code to directly
> interpolate a triangulation?

sorry, no, not yet.

Do you already have the triangulation? if so, it's pretty easy to contour.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2010-03-08 Thread gely



Christopher Barker wrote:
> 
> gely wrote:
>>> As I think about it, I'm going to have to write code to do this (contour 
>>> an unstructured triangular mesh) sometime soon, so please let me know if 
>>> it does exist already -- if not I'll try to remember to contribute it 
>>> when I get around to it.
>>>
>>> -Chris
>>>
>> 
>> Chris, I found this old thread. Did you ever find code to directly
>> interpolate a triangulation?
> 
> sorry, no, not yet.
> 
> Do you already have the triangulation? if so, it's pretty easy to contour.
> 

Thanks for the reply. Yes. I have the triangulation as a list of point
coordinates and a list of triangles with indices to the points. Good to know
it's not difficult. I'll have to chew on this for a bit.

-Geoff
-- 
View this message in context: 
http://old.nabble.com/Contour-Plotting-of-Varied-Data-on-a-Shape-tp25089018p27829342.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Working a piece at a time.

2010-03-08 Thread David Arnold
All,

I'm using Aptana (Eclipse) and pydev on a macbook pro. I'm trying to work with 
the following:

http://matplotlib.sourceforge.net/examples/user_interfaces/fourier_demo_wx.html

Now, this is a fairly complicated and interconnected piece of coding. When I am 
trying to learn something, I like to break it down into smaller chunks and 
test, which is much better than trying to type in the whole program (yes, I 
know I can copy and paste, but working a piece at a time is the best way for me 
to learn).

So, can anyone recommend how to test the Param class by itself, then the 
SliderGroup class, etc, then put all the pieces together?

Suggestions at how others work this idea would be very helpful.

David.



--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Failure compiling MPL on Snow Leopard

2010-03-08 Thread Jeremy Conlin
I am trying to compile MPL on Snow Leopard without success.  I have a
fairly fresh system (10.6.2) with python.org 2.6.4 installed.  I have
downloaded the MPL trunk with svn.  I had to make a small change to
the make.osx file because there are some extra ".  However I still
can't get MPL to compile/install; it fails when compiling zlib.  The
change I made in the make.osx file is on line 11.  It used to be:

ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"

and is now:

ARCH_FLAGS=-arch i386 -arch ppc -arch x86_64

The error I get while compiling is copied below.  Can anyone help me
figure out what is wrong?

Thanks,
Jeremy

x zlib-1.2.3/zutil.h
Checking for gcc...
Building static library libz.a version 1.2.3 with gcc.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()
Checking for snprintf() in stdio.h... No.
  WARNING: snprintf() not found, falling back to sprintf(). zlib
  can build but will be open to possible buffer-overflow security
  vulnerabilities.
Checking for return value of sprintf()... No.
  WARNING: apparently sprintf() does not return a value. zlib
  can build but will be open to possible string-format security
  vulnerabilities.
Checking for errno.h... No.
Checking for mmap support... No.
gcc -arch i386 -arch ppc -arch x86_64 -I/include -I/include/freetype2
-isysroot /Developer/SDKs/MacOSX10.6u.sdk -DNO_snprintf
-DHAS_sprintf_void -DNO_ERRNO_H   -c -o adler32.o adler32.c
gcc -arch i386 -arch ppc -arch x86_64 -I/include -I/include/freetype2
-isysroot /Developer/SDKs/MacOSX10.6u.sdk -DNO_snprintf
-DHAS_sprintf_void -DNO_ERRNO_H   -c -o compress.o compress.c
gcc -arch i386 -arch ppc -arch x86_64 -I/include -I/include/freetype2
-isysroot /Developer/SDKs/MacOSX10.6u.sdk -DNO_snprintf
-DHAS_sprintf_void -DNO_ERRNO_H   -c -o crc32.o crc32.c
In file included from crc32.c:29:
zutil.h:21:24: error: stddef.h: No such file or directory
zutil.h:23:22: error: string.h: No such file or directory
zutil.h:24:22: error: stdlib.h: No such file or directory
crc32.c:36:24: error: limits.h: No such file or directory
In file included from crc32.c:29:
zutil.h:21:24: error: stddef.h: No such file or directory
zutil.h:23:22: error: string.h: No such file or directory
zutil.h:24:22: error: stdlib.h: No such file or directory
crc32.c:36:24: error: limits.h: No such file or directory
In file included from crc32.c:29:
zutil.h:21:24: error: stddef.h: No such file or directory
zutil.h:23:22: error: string.h: No such file or directory
zutil.h:24:22: error: stdlib.h: No such file or directory
crc32.c:36:24: error: limits.h: No such file or directory
gcc -arch i386 -arch ppc -arch x86_64 -I/include -I/include/freetype2
-isysroot /Developer/SDKs/MacOSX10.6u.sdk -DNO_snprintf
-DHAS_sprintf_void -DNO_ERRNO_H   -c -o gzio.o gzio.c
lipo: can't figure out the architecture type of: /var/tmp//cc9xNLIP.out
make[1]: *** [crc32.o] Error 1
make[1]: *** Waiting for unfinished jobs
gzio.c:10:19: error: stdio.h: No such file or directory


and more errors below.

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users