SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S

1
(16)
2
(22)
3
(28)
4
(17)
5
(17)
6
(7)
7
8
(15)
9
(28)
10
(26)
11
(28)
12
(19)
13
(5)
14
(3)
15
(21)
16
(28)
17
(11)
18
(18)
19
(6)
20
(5)
21
(18)
22
(11)
23
(22)
24
(28)
25
(17)
26
(17)
27
(7)
28
(16)
29
(24)
30
(25)
31
(14)



Showing 15 results of 15

From: gely <ge...@us...> - 2010年03月08日 23:33:57
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.
From: Christopher B. <Chr...@no...> - 2010年03月08日 21:53:41
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
Chr...@no...
From: Jeff W. <js...@fa...> - 2010年03月08日 20:50:54
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/PSD1 Email : Jef...@no...
>>>> 325 Broadway Office : Skaggs Research Cntr 1D-113
>>>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Download Intel&#174; 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
>>>> Mat...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>
>>>>
>>>> 
>>>> 
>>> 
>>> 
>> -- 
>> Jeffrey S. Whitaker Phone : (303)497-6313
>> Meteorologist FAX : (303)497-6449
>> NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
>> 325 Broadway Office : Skaggs Research Cntr 1D-113
>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>>
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; 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
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>> 
>
> 
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: David G. <d_l...@ya...> - 2010年03月08日 20:30:04
--- On Fri, 3/5/10, David Goldsmith <d_l...@ya...> wrote:
> --- On Fri, 3/5/10, Friedrich Romstedt <fri...@gm...>
> 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
 
From: Shrividya R. <pen...@gm...> - 2010年03月08日 20:26:40
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 <module>()
 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: <script_7-03-10_co1_G-mode_spatial_map.py>
From: gely <ge...@us...> - 2010年03月08日 20:20:13
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
ge...@us...
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.
From: Alex S <sch...@gm...> - 2010年03月08日 20:20:10
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.
From: antonv <vas...@ya...> - 2010年03月08日 19:40:49
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/PSD1 Email : Jef...@no...
>>> 325 Broadway Office : Skaggs Research Cntr 1D-113
>>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Download Intel&#174; 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
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>> 
>>
>> 
> 
> 
> -- 
> Jeffrey S. Whitaker Phone : (303)497-6313
> Meteorologist FAX : (303)497-6449
> NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
> 325 Broadway Office : Skaggs Research Cntr 1D-113
> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
> 
> 
> ------------------------------------------------------------------------------
> Download Intel&#174; 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
> Mat...@li...
> 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.
From: Jeff W. <js...@fa...> - 2010年03月08日 17:58:18
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/PSD1 Email : Jef...@no...
>> 325 Broadway Office : Skaggs Research Cntr 1D-113
>> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
>>
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; 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
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>> 
>
> 
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: antonv <vas...@ya...> - 2010年03月08日 17:36:28
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/PSD1 Email : Jef...@no...
> 325 Broadway Office : Skaggs Research Cntr 1D-113
> Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
> 
> 
> ------------------------------------------------------------------------------
> Download Intel&#174; 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
> Mat...@li...
> 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.
From: Jeff W. <js...@fa...> - 2010年03月08日 15:22:54
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/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: antonv <vas...@ya...> - 2010年03月08日 11:46:23
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.
From: Alex S <sch...@gm...> - 2010年03月08日 06:34:16
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, 10000 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.
From: Eric F. <ef...@ha...> - 2010年03月08日 06:13:45
Shrividya Ravi wrote:
> Hi all,
> I have been using contourf quite happily with a square number of grid 
> points. e.g. a 20 by 20 grid. I recently decided to do a contourf plot 
> of a 20 by 15 grid (300 points) and I get errors. Unfortunately, I am 
> plotting experimental data so I cannot really tailor the grid size. 
> Here is the error message ipython generates:
> 
> *pylab.contourf((map_XX,map_YY,y))
It looks like the problem is that you have an extra set of parentheses, 
so that you are giving contourf a single argument--a tuple--instead of 
the three arguments that you intend. Contour and contourf have no 
problem with rectangular grids.
Eric
> *
> ---------------------------------------------------------------------------
> TypeError Traceback (most recent call last)
> 
> /media/ANAMIKA/crashing out 
> Raman/script_7-03-10_co1_G-mode_spatial_map.py in <module>()
> ----> 1
> 2
> 3
> 4
> 5
> 
> /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)
> 759 if Nargs <= 2:
> 760 z = ma.asarray(args[0], dtype=np.float64)
> --> 761 x, y = self._initialize_x_y(z)
> 762 elif Nargs <=4:
> 763 x,y,z = self._check_xyz(args[:3])
> 
> /usr/lib/pymodules/python2.6/matplotlib/contour.pyc in 
> _initialize_x_y(self, z)
> 696 '''
> 697 if z.ndim != 2:
> --> 698 raise TypeError("Input must be a 2D array.")
> 699 else:
> 700 Ny, Nx = z.shape
> 
> TypeError: Input must be a 2D array.
> 
> If anyone has a solution, please do let me know!
> Many thanks!
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> Download Intel&#174; 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Shrividya R. <pen...@gm...> - 2010年03月08日 01:32:42
Hi all,
I have been using contourf quite happily with a square number of grid
points. e.g. a 20 by 20 grid. I recently decided to do a contourf plot of a
20 by 15 grid (300 points) and I get errors. Unfortunately, I am plotting
experimental data so I cannot really tailor the grid size. Here is the
error message ipython generates:
*pylab.contourf((map_XX,map_YY,y))
*
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/media/ANAMIKA/crashing out Raman/script_7-03-10_co1_G-mode_spatial_map.py
in <module>()
----> 1
 2
 3
 4
 5
/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)
 759 if Nargs <= 2:
 760 z = ma.asarray(args[0], dtype=np.float64)
--> 761 x, y = self._initialize_x_y(z)
 762 elif Nargs <=4:
 763 x,y,z = self._check_xyz(args[:3])
/usr/lib/pymodules/python2.6/matplotlib/contour.pyc in _initialize_x_y(self,
z)
 696 '''
 697 if z.ndim != 2:
--> 698 raise TypeError("Input must be a 2D array.")
 699 else:
 700 Ny, Nx = z.shape
TypeError: Input must be a 2D array.
If anyone has a solution, please do let me know!
Many thanks!

Showing 15 results of 15

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /