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) |
|
|
|
I need a longer sample of the dash pattern in the legend. Possible? (numpoints does not work.) Thanks, Alan Isaac
Dear matplotlib users, I'm trying to make a plot that shares the x axis, but that have two different y scales. I can do this, almost, I say almost because I don't know how to turn off the reflection of my y ticks, so they are reflected and obscure the scale on the other side, if the scales aren't similar. I looked at the example http://matplotlib.sourceforge.net/plot_directive/mpl_examples/api/two_scales.py and it hints at a solution (Hint: use the xaxis instance and call tick_bottom and tick_top in place of tick_left and tick_right.), but this doesn't make any sense to me. I think I need to "Turn the axes rectangular frame off on the 2nd axes to keep it from obscuring the first." but I'm not sure if this is what I need to do, if it is, I'm also not sure how to do this. Thanks for any ideas, Matthew
Ah, that worked fine. Thanks a lot. Alex -- View this message in context: http://old.nabble.com/Making-tick-marks-of-a-secondary-axis-line-up-with-the-primary-axis-tp27854166p27855043.html Sent from the matplotlib - users mailing list archive at Nabble.com.
> -----Original Message----- > From: Alex S [mailto:sch...@gm...] > Hi there, > I'm trying to make a plot with two y axes. I'm able to do that no > problem, > but what I'd really like to do now is make the tick marks line up for > them > both so that they both use the same grid. Is there a simple way to do > this? > Basically, I want to force the number of tick marks on the right hand > axis > to be the same as on the left hand axis, and I'd like it to select "nice > numbers" to do so (ie not intervals of .358 or something). Hey Alex, I always just figure this out on my own. There might exist a more elegant way though. Starting with this: import matplotlib.pyplot as plt fig = plt.figure() ax1 = fig.add_subplot(111) ax2 = ax1.twinx() # plot stuff # So then you could do something like: ytx1 = ax1.get_yticks() ...and then use to len(ytx1) and range() to ax2.set_yticks(blahblah). The tricky part is picking a max for your range() so that your stepsize produces nice numbers. > Also, on a somewhat related note, is there a simple way to force the y > ticks > to start at 0 rather than some other value? ax1.set_ylim(ymin=0) HTH, -paul h.
How about this (though it is getting a little clunky): plot(*transpose(map(lambda x:(x,sin(x**2)/x**3), arange(3,6, 0.01)))) On Wed, Mar 10, 2010 at 7:57 PM, Chloe Lewis <ch...@be...> wrote: > ...although > > >>plot(map(lambda x:x**2, range(5,15))) > > probably doesn't do exactly what you want; is the idea that > > >>plot(range(5,15),lambda x:x**2) #DOESN'T WORK > > should automatically work like > > >>plot(range(5,15), map(lambda x:x**2, range(5,15))) > > by recognizing that the second argument is a function rather than a > list? > > &C > > > On Mar 10, 2010, at 10:47 AM, Chloe Lewis wrote: > >> You'd always have to specify the domain, so >> >> plot(map(lambda x:x**2, range(1,10))) >> >> shouldn't be much longer than the minimal command. >> >> &C >> >> >> On Mar 10, 2010, at 10:12 AM, max ulidtko wrote: >> >>> Hi. >>> >>> Is it possible to plot arbitrary lambda function with matplotlib? >>> Say, if i have f = lambda x: x*sin(x), can i just plot it without >>> building argument-value arrays? It would be a very convenient and >>> useful feature. >>> >>> >>> ------ >>> Sincerely, >>> max ulidtko >>> ------------------------------------------------------------------------------ >>> 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 >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> ------------------------------------------------------------------------------ >> 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 >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------------------------------------------------------ > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
...although >>plot(map(lambda x:x**2, range(5,15))) probably doesn't do exactly what you want; is the idea that >>plot(range(5,15),lambda x:x**2) #DOESN'T WORK should automatically work like >>plot(range(5,15), map(lambda x:x**2, range(5,15))) by recognizing that the second argument is a function rather than a list? &C On Mar 10, 2010, at 10:47 AM, Chloe Lewis wrote: > You'd always have to specify the domain, so > > plot(map(lambda x:x**2, range(1,10))) > > shouldn't be much longer than the minimal command. > > &C > > > On Mar 10, 2010, at 10:12 AM, max ulidtko wrote: > >> Hi. >> >> Is it possible to plot arbitrary lambda function with matplotlib? >> Say, if i have f = lambda x: x*sin(x), can i just plot it without >> building argument-value arrays? It would be a very convenient and >> useful feature. >> >> >> ------ >> Sincerely, >> max ulidtko >> ------------------------------------------------------------------------------ >> 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 >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------------------------------------------------------ > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
You'd always have to specify the domain, so plot(map(lambda x:x**2, range(1,10))) shouldn't be much longer than the minimal command. &C On Mar 10, 2010, at 10:12 AM, max ulidtko wrote: > Hi. > > Is it possible to plot arbitrary lambda function with matplotlib? > Say, if i have f = lambda x: x*sin(x), can i just plot it without > building argument-value arrays? It would be a very convenient and > useful feature. > > > ------ > Sincerely, > max ulidtko > ------------------------------------------------------------------------------ > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Hi there, I'm trying to make a plot with two y axes. I'm able to do that no problem, but what I'd really like to do now is make the tick marks line up for them both so that they both use the same grid. Is there a simple way to do this? Basically, I want to force the number of tick marks on the right hand axis to be the same as on the left hand axis, and I'd like it to select "nice numbers" to do so (ie not intervals of .358 or something). Also, on a somewhat related note, is there a simple way to force the y ticks to start at 0 rather than some other value? Thanks a lot, Alex -- View this message in context: http://old.nabble.com/Making-tick-marks-of-a-secondary-axis-line-up-with-the-primary-axis-tp27854166p27854166.html Sent from the matplotlib - users mailing list archive at Nabble.com.
I will go to bed early tonight.... disregard this thread, wrong version of matplotlib anyway..... things are now ok. Johann On 03/10/2010 06:45 PM, Johann Cohen-Tanugi wrote: > Hi there, I am not sure whether I am the only one to experience that but > on my new FEDORA 12 box GTK+ is shipped with the following structure > for the headers : /usr/include/gtk-1.2/gtk/gtk.h > This does not seem to be expected by matplotlib setup.cfg , or am I > missing something? > thanks, > Johann > > ------------------------------------------------------------------------------ > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Hi. Is it possible to plot arbitrary lambda function with matplotlib? Say, if i have f = lambda x: x*sin(x), can i just plot it without building argument-value arrays? It would be a very convenient and useful feature. ------ Sincerely, max ulidtko
Hi there, I am not sure whether I am the only one to experience that but on my new FEDORA 12 box GTK+ is shipped with the following structure for the headers : /usr/include/gtk-1.2/gtk/gtk.h This does not seem to be expected by matplotlib setup.cfg , or am I missing something? thanks, Johann
You're right, the lons was getting overwritten! Thanks again for the help! Anton ________________________________ From: Jeff Whitaker <js...@fa...> To: Anton Vasilescu <vas...@ya...> Cc: mat...@li... Sent: Wed, March 10, 2010 8:57:16 AM Subject: Re: [Matplotlib-users] shiftgrid 'cyclic point not included' error Anton Vasilescu wrote: > Hi Jeff, > > Thank you for looking at the code for me! It works perfect for the first image but when it tries to do the second it errors out saying: "lon0 outside of range of lonsin". Any idea why is that happening? Is it happening for you too? > > Thanks, > Anton Anton: Probably because the original value of lons has been overwritten with the shifted grid longitudes. You need to save the original lons array to pass to shiftgrid for the second grid. -Jeff > > ------------------------------------------------------------------------ > *From:* Jeff Whitaker <js...@fa...> > *To:* antonv <vas...@ya...> > *Cc:* mat...@li... > *Sent:* Mon, March 8, 2010 12:50:48 PM > *Subject:* Re: [Matplotlib-users] shiftgrid 'cyclic point not included' error > > antonv wrote: > > Hi Jeff, > > > > Here is the whole script: http://old.nabble.com/file/p27826457/_test_shiftgrid.py _test_shiftgrid.py<http://_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... <mailto:Jef...@no...> > >>>> 325 Broadway Office : 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 > >>>> Mat...@li... <mailto: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... <mailto:Jef...@no...> > >> 325 Broadway Office : 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 > >> Mat...@li... <mailto: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... <mailto:Jef...@no...> > 325 Broadway Office : Skaggs Research Cntr 1D-113 > Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg > > -- 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
Anton Vasilescu wrote: > Hi Jeff, > > Thank you for looking at the code for me! It works perfect for the > first image but when it tries to do the second it errors out saying: > "lon0 outside of range of lonsin". Any idea why is that happening? Is > it happening for you too? > > Thanks, > Anton Anton: Probably because the original value of lons has been overwritten with the shifted grid longitudes. You need to save the original lons array to pass to shiftgrid for the second grid. -Jeff > > ------------------------------------------------------------------------ > *From:* Jeff Whitaker <js...@fa...> > *To:* antonv <vas...@ya...> > *Cc:* mat...@li... > *Sent:* Mon, March 8, 2010 12:50:48 PM > *Subject:* Re: [Matplotlib-users] shiftgrid 'cyclic point not > included' error > > antonv wrote: > > Hi Jeff, > > > > Here is the whole script: > http://old.nabble.com/file/p27826457/_test_shiftgrid.py > _test_shiftgrid.py <http://_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... > <mailto:Jef...@no...> > >>>> 325 Broadway Office : 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 > >>>> Mat...@li... > <mailto: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... > <mailto:Jef...@no...> > >> 325 Broadway Office : 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 > >> Mat...@li... > <mailto: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... > <mailto:Jef...@no...> > 325 Broadway Office : Skaggs Research Cntr 1D-113 > Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg > > -- 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
> [...] I deduce from your approach that there is nothing > built in. I am surprised [...] When you mentioned it, so was I. From axes.py: -------- def set_default_color_cycle(clist): """ Change the default cycle of colors that will be used by the plot command. This must be called before creating the :class:`Axes` to which it will apply; it will apply to all future axes. *clist* is a sequence of mpl color specifiers """ _process_plot_var_args.defaultColors = clist[:] rcParams['lines.color'] = clist[0] -------- That will tidy things up a bit. Not only do I change to B&W for plots I expect to print, I try to switch fonts and DPI and so forth as a group for print vs. screen vs. projector. I don't have that all ironed out yet, though. &C
I was running this example, but would like to show the grid. For some reason, the plt.grid("on") does not work. Any thoughts? http://matplotlib.sourceforge.net/examples/axes_grid/simple_axisline2.html Thanks, Krishna Adrianto Pribadi Test Engineer Desk (TTF): 256.480.4450 Cell: 412.401.1477 Harley-Davidson Motor Co. Talladega Test Facility Vehicle Test Stands (VTS) This communication (including any attachments) is for the use of the intended recipient(s) only and may contain information that is confidential, privileged or otherwise legally protected. Any unauthorized use or dissemination of this communication is prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.
Thanks. That's a good suggestion. It's been applied to SVN, and will make it on to the website the next time the website is updated. Mike David Arnold wrote: > All, > > The linebuilder program on: > http://matplotlib.sourceforge.net/users/event_handling.html > > Needs two extra lines, one at the beginning and one at the end. Their > absence, particularly the second one, can cause confusion. > > import matplotlib.pyplot as plt > > class LineBuilder: > def __init__(self, line): > self.line = line > self.xs = list(line.get_xdata()) > self.ys = list(line.get_ydata()) > self.cid = > line.figure.canvas.mpl_connect('button_press_event', self) > > def __call__(self, event): > print 'click', event > if event.inaxes!=self.line.axes: return > self.xs.append(event.xdata) > self.ys.append(event.ydata) > self.line.set_data(self.xs, self.ys) > self.line.figure.canvas.draw() > > fig = plt.figure() > ax = fig.add_subplot(111) > ax.set_title('click to build line segments') > line, = ax.plot([0], [0]) # empty line > linebuilder = LineBuilder(line) > > plt.show() > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
> On Mar 9, 2010, at 9 Mar, 1:52 PM, Alan G Isaac wrote: > > I need a figure containing color line plots to > > be changed to grayscale, cycling through line > > styles instead of colors. How? On 3/9/2010 10:45 PM, Chloe Lewis wrote: > Here's a skeleton, for a series of lines that get darker and more > solid (from past to present, as I use it): Hi Chloe. I deduce from your approach that there is nothing built in. I am surprised: are most people able to publish color plots in their articles these days, so that the needed for a cycle of greyscale linestyles is too rare to make it into Matplotlib? Thanks! Alan
Chris Barker wrote: > I think it would be great to have in MPL. > > What code are you using for the triangulation? Does it do constrained > delauney? My code only does the contouring; you have to input the triangulation. In the examples included with the code I used matplotlib.delaunay to do the triangulations so as not to reinvent the wheel. To include it in MPL, I would need to improve it somewhat (there are a couple of known bugs and insufficient documentation) and there would need to be a discussion of the API. At the moment I am using tricontour(x, y, triangulation_indices, z, optional_mask) followed by the usual contour args (N or V) and kwargs. Is this OK? I've also written utility plotting functions triplot, trifill and tripcolor; are these wanted? In terms of implementation, at the python level I have a TriContourSet class which is the same as the existing ContourSet apart from a few lines that deal with input arguments and calling the appropriate underlying C++ code. Ideally it would be sensible to refactor the common python code into a new class (BaseContourSet?) and have relatively thin derived ContourSet and TriContourSet classes. But I'm not sure you'd like a relatively new mpl contributor to change such important code... Ian
Hi Jeff, Thank you for looking at the code for me! It works perfect for the first image but when it tries to do the second it errors out saying: "lon0 outside of range of lonsin". Any idea why is that happening? Is it happening for you too? Thanks, Anton ________________________________ From: Jeff Whitaker <js...@fa...> To: antonv <vas...@ya...> Cc: mat...@li... Sent: Mon, March 8, 2010 12:50:48 PM Subject: Re: [Matplotlib-users] shiftgrid 'cyclic point not included' error 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® 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® 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
All, The linebuilder program on: http://matplotlib.sourceforge.net/users/event_handling.html Needs two extra lines, one at the beginning and one at the end. Their absence, particularly the second one, can cause confusion. import matplotlib.pyplot as plt class LineBuilder: def __init__(self, line): self.line = line self.xs = list(line.get_xdata()) self.ys = list(line.get_ydata()) self.cid = line.figure.canvas.mpl_connect('button_press_event', self) def __call__(self, event): print 'click', event if event.inaxes!=self.line.axes: return self.xs.append(event.xdata) self.ys.append(event.ydata) self.line.set_data(self.xs, self.ys) self.line.figure.canvas.draw() fig = plt.figure() ax = fig.add_subplot(111) ax.set_title('click to build line segments') line, = ax.plot([0], [0]) # empty line linebuilder = LineBuilder(line) plt.show()
Here's a skeleton, for a series of lines that get darker and more solid (from past to present, as I use it): from itertools import cycle grey_linestyles = cycle(map(lambda tu: dict(zip(('color','dashes'),tu)),(('0.5',(4,1,1,1)),('0.4',(2,1)), ('0.3',(5,1,2,1)),('0.2',(4,1)),('0.1',(6,1)),('0.0',(10,1)),('0.0', (20,1))))) class IsotoProfileFigure(Figure): def __init__(self, *args, **kwargs): self.linestyles = grey_linestyles def plot(self, gases, label='_nolegend'): style = self.linestyles.next() #TODO: allow for usual style modifiers passed in self.isoaxis.plot(deltas,self.verts,label=label, **style) On Mar 9, 2010, at 9 Mar, 1:52 PM, Alan G Isaac wrote: > I need a figure containing color line plots to > be changed to grayscale, cycling through line > styles instead of colors. How? > > Thanks, > Alan Isaac > > PSI suppose I searched the web ineffectively on this, > but I did try. > > > ------------------------------------------------------------------------------ > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users Chloe Lewis Graduate student, Amundson Lab Ecosystem Sciences 137 Mulford Hall Berkeley, CA 94720-3114 http://nature.berkeley.edu/~chlewis
> Also, how is scipy imported? Just "form scipy import *" or something > similar to numpy? > > I haven't been able to find this info online or in documents yet. > > > Thanks, > > Andre > > Hi, > > Look in IPython/Shell.py to see how pylab option is being evaluated. > And similarly in matplotlib/lib/matplotlib/pylab.py > > Also in your ipythonrc file you can unset pylab_import_all option to > have a clearer namespace (i.e. the contents of pylab.py will not be > explicitly loaded.) > > And yes those are the same NumPy arrays. You can always check this > by "type" builtin. Thanks! Andre > > -- > Gökhan
On Tue, Mar 9, 2010 at 6:48 PM, Andre Walker-Loud <wal...@gm...>wrote: > Hi All, > > I am trying to understand exactly what the -pylab option does when I > launch ipython -pylab - thought some folks here might know. > > For example, after executing > > ipython -pylab > > I can type either > > a = np.array([1.,10.]) > > OR > > b = array([1.,10.]) > > are these both numpy arrays? And clearly, there has been an "import > numpy as np" from the -pylab option. > > Also, how is scipy imported? Just "form scipy import *" or something > similar to numpy? > > I haven't been able to find this info online or in documents yet. > > > Thanks, > > Andre > Hi, Look in IPython/Shell.py to see how pylab option is being evaluated. And similarly in matplotlib/lib/matplotlib/pylab.py Also in your ipythonrc file you can unset pylab_import_all option to have a clearer namespace (i.e. the contents of pylab.py will not be explicitly loaded.) And yes those are the same NumPy arrays. You can always check this by "type" builtin. -- Gökhan
Hi All, I am trying to understand exactly what the -pylab option does when I launch ipython -pylab - thought some folks here might know. For example, after executing ipython -pylab I can type either a = np.array([1.,10.]) OR b = array([1.,10.]) are these both numpy arrays? And clearly, there has been an "import numpy as np" from the -pylab option. Also, how is scipy imported? Just "form scipy import *" or something similar to numpy? I haven't been able to find this info online or in documents yet. Thanks, Andre