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
(1) |
2
(43) |
3
(17) |
4
(12) |
5
(9) |
6
(14) |
7
(8) |
8
|
9
(15) |
10
(16) |
11
(11) |
12
(10) |
13
(20) |
14
(7) |
15
(4) |
16
(16) |
17
(25) |
18
(10) |
19
(27) |
20
(26) |
21
(6) |
22
(20) |
23
(12) |
24
(15) |
25
(22) |
26
(15) |
27
(43) |
28
(8) |
29
(6) |
30
(12) |
|
|
|
|
|
I tried to follow the directions per % python setup.py build % python setup.py install but within the build step I get the message "library not found for -lpng" It exits with an error code, and then install does not work either (no surprise). I also tried easy_install. It says that I have numpy 1.0.1 but need numpy 1.1, which I have and which works. So I downloaded numpy 1.1 again and successfully installed it (again), but easy_install gives me the same message. I have wxpython installed, and it works, but don't know if that's related to my problems. I'm also a newbie to the mac, and am having trouble deciphering some of the posts with similar issues. Thanks for whatever help you can provide. Dan
Dear all, I like to include a box and whisker plot as an eps in a latex document. Does anybody know how to produce such a plot in black and white, or some suitable gray scale? boxplot() does not accept color as an argument. I also tried putting the function gray() before and after boxplo(), but that does not work. Thanks in advance. bye Nicky
John - Thanks for the quick fix. I'm having a separate issue now with an EPS file being generated (using savefig() again) that appears to be invalid (can't display it in OS X Preview, or convert to PDF with ps2pdf). Unfortunately, the code that creates this particular file is rather involved, and hard to replicate with one simple script. If I send the offending EPS file (it's 1.4 MB zipped), is it possible to tell from that what the problem is? The errors from ps2pdf are: Error: /undefined in --get-- Operand stack: true --dict:43/43(ro)(L)-- .notdef Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1905 1 3 %oparray_pop 1904 1 3 %oparray_pop --nostringval-- 1888 1 3 %oparray_pop 1771 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- %finish_show --nostringval-- --nostringval-- 5 4 0 --nostringval-- (pdf_text_enum_t) %op_show_continue --nostringval-- Dictionary stack: --dict:1144/1684(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)-- --dict:61/112(L)-- --dict:20/25(ro)(L)-- Current allocation mode is local Last OS error: 2 Current file position is 996122 GPL Ghostscript 8.61: Unrecoverable error, exit code 1 --Mike John Hunter wrote: > On Wed, Jun 11, 2008 at 10:14 AM, John Hunter <jd...@gm...> wrote: > > >> Interesting. When I plot it on my screen it looks correct with a *Agg >> GUI backend. But when I save it (either from the GUI or using >> savefig) it has the problem you describe. This suggests to me that >> either some cached information or something is not getting notified of >> the different default dpi in savefig. I'll look into it. Since PS is >> dpi independent, it would not affect it. >> > > Well, my diagnosis wasn't correct, but I fixed the problem. In the > caching of the text layout, we were not taking into account the > different renderers in the cache key. Since PS has a nominal dpi > setting that is ignored by postscript, the differences in dpi were not > getting picked up in the layout cache. The solution I implemented was > to simply add the renderer id to the property tuple used for caching. > Fixed in svn r5470. > > JDH > -- ------------------------------------------------------ Michael Hearne mh...@us... (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ------------------------------------------------------
You don't have to do everything that I did, but I have libpng and whatnot installed in /usr/local for other purposes anyway, and I didn't have a particular need to build a universal binary version of matplotlib. Furthermore, using GCC 4.2, while forcing one to get rid of Wno-long-double (an Apple-only thing anyway, and I think it's bad practice to include assumption of such options in a Makefile), allowed me to keep -O3 since it does not have that particular bug. So IF you want to keep the O3 optimisation, then you should install the 4.2 compiler, make sure it gets used, and eliminate the -Wno-long-double flag from the Makefile. No other changes necessary relative to the standard instructions. I've filed a bug report with Apple about the problem with their GCC 4.0.1 in Xcode 3, and as soon as I can get my bug reporting ability up and running again (login has been wonky lately), I'm following up with some additional information they asked for. I'm sorry if I caused some confusion with my personal preferences. Josh On Thu, Jun 5, 2008 at 5:19 PM, Christopher Burns <cb...@be...> wrote: > Is this really the current solution to building matplotlib on OSX, > installing a new compiler and hacking the python Makefile? > > I was able to build matplotlib 0.91.2 just fine on OSX, sometime > around March I checked out the truck to fix a bug and discovered I > couldn't build the svn version. Matplotlib is the only package with a > dependency on gcc 4.2, all the other packages I build, numpy, scipy, > ipython, etc... build with gcc 4.0. Why do you have this dependency? > Is there an easier solution? > > I'm reluctant to upgrade to gcc 4.2 and loose the ability to build > other packages I need. > > Chris > > On Thu, May 29, 2008 at 4:51 AM, Joshua Lippai <dis...@gm...> wrote: >> I've consistently been able to build matplotlib on OS X. Just make >> sure you have all the dependencies installed. Personally, I have lbpng >> and whatnot installed in /usr/local instead of /usr/X11. I don't know >> if that'll help. Also, I use the GCC 4.2 that Apple has available for >> download on developer.apple.com. Then you just change the Makefile in >> the /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/ >> directory to not use Wno-long-double or no-cpp-precomp. I also took >> out all the ppc arch flags since it was causing some issues there with >> my versions of libpng and whatnot technically not being universal >> binaries. If you don't want to build univeral binary versions of your >> dependencies or use the ones alread provided in /usr/X11 (which are >> universal I think), you should make Python only build for your >> architecture, which is what I did. >> >> My only issue with matplotlib thusfar seems to be the inability to do >> the plot3d examples from the scipy website, but I'm told that stuff is >> officially unsupported anyway. >> >> Josh >> > > -- > Christopher Burns > Computational Infrastructure for Research Labs > 10 Giannini Hall, UC Berkeley > phone: 510.643.4014 > http://cirl.berkeley.edu/ >
Marshall, You are right--there is a line of boilerplate that I left out of quiver, contour, and contourf. At the very top of each of these methods in axes.py there should be the line if not self._hold: self.cla() You can either add the line to your axes.py, or just do the manual pylab cla() before each call to quiver in your script. Eric Marshall Tappen wrote: > Hello, > > I'm having problems making quiver respect the hold state of the plot > For example, running this code: > > from pylab import * > > def quiver_test(): > x,y=mgrid[-10:10,-10:10] > > u=2*x; > v=2*y; > hold(False) > quiver(x,y,u,v,hold=False) > quiver(x,y,u,u,hold=False) > draw() > > quiver_test() > > Two sets of quiver plots appear. I'm using the packages from Ubuntu > Hardy in ipython, but I didn't see anything in the changelog for > 0.91.3 relating to quiver. > > Any suggestions for fixing this behavior would be greatly appreciated. > > Thanks, > > Marshall > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
On Wed, Jun 11, 2008 at 10:14 AM, John Hunter <jd...@gm...> wrote: > Interesting. When I plot it on my screen it looks correct with a *Agg > GUI backend. But when I save it (either from the GUI or using > savefig) it has the problem you describe. This suggests to me that > either some cached information or something is not getting notified of > the different default dpi in savefig. I'll look into it. Since PS is > dpi independent, it would not affect it. Well, my diagnosis wasn't correct, but I fixed the problem. In the caching of the text layout, we were not taking into account the different renderers in the cache key. Since PS has a nominal dpi setting that is ignored by postscript, the differences in dpi were not getting picked up in the layout cache. The solution I implemented was to simply add the renderer id to the property tuple used for caching. Fixed in svn r5470. JDH
Hello, I'm having problems making quiver respect the hold state of the plot For example, running this code: from pylab import * def quiver_test(): x,y=mgrid[-10:10,-10:10] u=2*x; v=2*y; hold(False) quiver(x,y,u,v,hold=False) quiver(x,y,u,u,hold=False) draw() quiver_test() Two sets of quiver plots appear. I'm using the packages from Ubuntu Hardy in ipython, but I didn't see anything in the changelog for 0.91.3 relating to quiver. Any suggestions as to fixing this behavior would be greatly appreciated. Thanks, Marshall
On Mon, Jun 9, 2008 at 3:35 PM, Michael Hearne <mh...@us...> wrote: > savefig('textplot.eps') > savefig('textplot.png') > close(fig) Interesting. When I plot it on my screen it looks correct with a *Agg GUI backend. But when I save it (either from the GUI or using savefig) it has the problem you describe. This suggests to me that either some cached information or something is not getting notified of the different default dpi in savefig. I'll look into it. Since PS is dpi independent, it would not affect it. Thanks for the reminder. JDH
I'm reposting this, as it may have gotten lost in other discussions. I think there is possibly a bug in the PNG renderer for TkAgg (which is what I think I'm using when I say "matplotlib.use('agg')"), as I get different visual results from savefig when saving to EPS and PNG. If this isn't a bug, can someone please let me know what I'm doing wrong, or point me to a workaround for saving to PNG files? Thanks, Mike -------- Original Message -------- Subject: [Matplotlib-users] bounding box functionality with text() function Date: 2008年6月09日 14:35:24 -0600 From: Michael Hearne <mh...@us...> Reply-To: mh...@us... To: MatPlotLib Users <mat...@li...> I'm having a problem with the bbox keyword to the text() function. The code below, for me, results in one postscript file that looks fine, but the PNG file has letters outside of the bounding box for most of the words I plot. I'm using matplotlib '0.98pre' on Mac OS X. import matplotlib matplotlib.use('agg') from pylab import * x = array([6,7,8,9,10]) y = array([6,7,8,9,10]) fig = figure() plot(x,y,'rx') hold('on') fontdict2 = {'fontweight':'light', 'color': 'k', 'fontsize':9} words = ['Hi','Goodbye','What''s this','Aloha','So long, farewell'] for i in range(0,len(x)): tx = x[i] ty = y[i] word = words[i] text(tx,ty,word,fontdict2,bbox={'facecolor':'w'}) savefig('textplot.eps') savefig('textplot.png') close(fig) -- ------------------------------------------------------ Michael Hearne mh...@us... (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ------------------------------------------------------ ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- ------------------------------------------------------ Michael Hearne mh...@us... (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. ------------------------------------------------------
Hello, I'm having problems making quiver respect the hold state of the plot For example, running this code: from pylab import * def quiver_test(): x,y=mgrid[-10:10,-10:10] u=2*x; v=2*y; hold(False) quiver(x,y,u,v,hold=False) quiver(x,y,u,u,hold=False) draw() quiver_test() Two sets of quiver plots appear. I'm using the packages from Ubuntu Hardy in ipython, but I didn't see anything in the changelog for 0.91.3 relating to quiver. Any suggestions for fixing this behavior would be greatly appreciated. Thanks, Marshall
Here's a response to a similar question a few weeks back: http://www.nabble.com/Kriging-with-Matplotlib-to17281645.html I haven't tried using the RandomRealizations package yet, but it looks good and well documented. Regards, Scott >>> Lionel Roubeyrie <lro...@li...> 06/11/08 8:47 AM >>> Hi Jeff, Do you have in your bags a similar approch but using kriging? For the moment we use R via Rpy to make the computation, but if you know a more pythonic way to do so, I'll appreciate :-) Cordialy Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/
Hi Jeff, Do you have in your bags a similar approch but using kriging? For the moment we use R via Rpy to make the computation, but if you know a more pythonic way to do so, I'll appreciate :-) Cordialy Le mardi 10 juin 2008, Jeff Whitaker a écrit : > Jason Li wrote: > > Hi Jeff, > > > > Thanks for your help in the past. Just wondering if I can ask another > > question. This is with regard to plotting irregularly spaced geophysical > > data. > > > > I have been happy plotting gridded data away using matplotlib/basemap. > > Now I want to try irregularly spaced satellite data (swath data), using > > the confourf function. Basically to replace our IDL program to make > > plots like this: > > > > http://aurapar2u.ecs.nasa.gov/airscal2/Aqua_AIRS_Level1/AIRIBRAD.005/2008 > >/001/AIRS.2008年01月01日.067.L1B.AIRS_Rad.v5.0.0.0.G08003111751.hdf.jpg > > > > > > > > I have not had much luck yet. In the following example, lat and lon are > > 2D arrays. > > > > map = Basemap(projection='cyl', lon_0=0, ax=ax, llcrnrlon=minLon, > > llcrnrlat=minLat, urcrnrlon=maxLon, urcrnrlat=maxLat) > > x, y = map(lon, lat) > > cs = map.contourf(x, y, obs, levels, cmap=myPrettyCmap) > > > > The error message: > > > > File > > "/usr/local//lib/python2.5/site-packages/matplotlib/toolkits/basemap/base > >map.py", line 2442, in contourf > > xl = xx.compress(condition).tolist() > > AttributeError: compress > > > > > > Do you have a good example as how to do this kind of thing? > > > > thanks > > Jason: contourf expects gridded data. I think you need to use one of > the approaches outlined in the cookbook entry > > http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data > > to grid your data, then plot it. > > If you'd like to send me a sample of the data, I can show you what I mean. > > -Jeff -- Lionel Roubeyrie - lro...@li... Chargé d'études et de maintenance LIMAIR - la Surveillance de l'Air en Limousin http://www.limair.asso.fr
Anyway guys, thanks a lot for the fast answer and all the good work you're doing. :) Johan 2008年6月10日 Eric Firing <ef...@ha...>: > John Hunter wrote: > > We should consider fix the autoscaling so that tthe default view lim >> are always open intervals that contain the data. >> > > This has been on my mental list for a long time. I will look into it. > > Eric >
John Hunter wrote: > We should consider fix the autoscaling so that tthe default view lim > are always open intervals that contain the data. This has been on my mental list for a long time. I will look into it. Eric
Jason Li wrote: > Hi Jeff, > > Thanks for your help in the past. Just wondering if I can ask another > question. This is with regard to plotting irregularly spaced geophysical > data. > > I have been happy plotting gridded data away using matplotlib/basemap. > Now I want to try irregularly spaced satellite data (swath data), using > the confourf function. Basically to replace our IDL program to make > plots like this: > > http://aurapar2u.ecs.nasa.gov/airscal2/Aqua_AIRS_Level1/AIRIBRAD.005/2008/001/AIRS.2008年01月01日.067.L1B.AIRS_Rad.v5.0.0.0.G08003111751.hdf.jpg > > > > I have not had much luck yet. In the following example, lat and lon are > 2D arrays. > > map = Basemap(projection='cyl', lon_0=0, ax=ax, llcrnrlon=minLon, > llcrnrlat=minLat, urcrnrlon=maxLon, urcrnrlat=maxLat) > x, y = map(lon, lat) > cs = map.contourf(x, y, obs, levels, cmap=myPrettyCmap) > > The error message: > > File > "/usr/local//lib/python2.5/site-packages/matplotlib/toolkits/basemap/basemap.py", > line 2442, in contourf > xl = xx.compress(condition).tolist() > AttributeError: compress > > > Do you have a good example as how to do this kind of thing? > > thanks > Jason: contourf expects gridded data. I think you need to use one of the approaches outlined in the cookbook entry http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data to grid your data, then plot it. If you'd like to send me a sample of the data, I can show you what I mean. -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
On Tue, Jun 10, 2008 at 10:32 AM, Johan Mazel <joh...@gm...> wrote: > This is exactly what I wanted. > Thanks a lot. > I just wanted to know wether it was possible to add a little margin for the > y axes because I can't see the highest point of the curve since it's on the > edge of the subplot. > Anyway, thanks a lot for the good work. Yes, just set the xlim or ylim as desired xlim(-5,5) ylim(-6,10) We should consider fix the autoscaling so that tthe default view lim are always open intervals that contain the data. JDH
This is exactly what I wanted. Thanks a lot. I just wanted to know wether it was possible to add a little margin for the y axes because I can't see the highest point of the curve since it's on the edge of the subplot. Anyway, thanks a lot for the good work. Johan 2008年6月10日 John Hunter <jd...@gm...>: > On Tue, Jun 10, 2008 at 8:51 AM, Johan Mazel <joh...@gm...> > wrote: > > Hi > > I display two data vectors : the first is in the subplot 2,1,1 and the > > second in the subplot 2,1,2. Each of the data vectors have an x vector of > > dates to display values on x axis. > > The 2 data vectors are correlated in time and I want to show the > > correlation. > > > > But the two data vectors are not aligned as I wanted them to be since the > > data vector of subplot 2,1,2 have less element than the other one. > > > > I can't use the same x vector for both curves since it would force me to > add > > empty values in the second data vector. And I don't want to do that since > it > > would add useless points in my curve. > > > > So I need to find a way to allow me to align both data vectors on the > > different subplots without adding point to the data vector with a smaller > > number of elements. > > Does this do what you want? > > ax1 = subplot(211) > ax1.plot(x1, y1) > ax2 = subplot(212, sharex=ax1) > ax2.plot(x2, y2) > > ditto for sharey if you want to share the same y axes... > > > I >
On Tue, Jun 10, 2008 at 8:51 AM, Johan Mazel <joh...@gm...> wrote: > Hi > I display two data vectors : the first is in the subplot 2,1,1 and the > second in the subplot 2,1,2. Each of the data vectors have an x vector of > dates to display values on x axis. > The 2 data vectors are correlated in time and I want to show the > correlation. > > But the two data vectors are not aligned as I wanted them to be since the > data vector of subplot 2,1,2 have less element than the other one. > > I can't use the same x vector for both curves since it would force me to add > empty values in the second data vector. And I don't want to do that since it > would add useless points in my curve. > > So I need to find a way to allow me to align both data vectors on the > different subplots without adding point to the data vector with a smaller > number of elements. Does this do what you want? ax1 = subplot(211) ax1.plot(x1, y1) ax2 = subplot(212, sharex=ax1) ax2.plot(x2, y2) ditto for sharey if you want to share the same y axes... I
Yep, that works. I thought I had tried that, but I must have done something wrong. Sorry for the clutter, Mark On Tue, Jun 10, 2008 at 4:00 PM, John Hunter <jd...@gm...> wrote: > On Tue, Jun 10, 2008 at 8:41 AM, Tony S Yu <to...@mi...> wrote: > > Hey Mark, > > Actually, recalling subplot(211) seems to work for me. Strange. > > Yes, this is the expected behavior, you can reactivate any axes or > subplot by simply making the same axes or subplot call (with the same > arguments). This is discussed in the pylab tutorial section "working > with multiple figures and axes" at > http://matplotlib.sourceforge.net/tutorial.html#figs_and_axes > > JDH >
On Tue, Jun 10, 2008 at 8:41 AM, Tony S Yu <to...@mi...> wrote: > Hey Mark, > Actually, recalling subplot(211) seems to work for me. Strange. Yes, this is the expected behavior, you can reactivate any axes or subplot by simply making the same axes or subplot call (with the same arguments). This is discussed in the pylab tutorial section "working with multiple figures and axes" at http://matplotlib.sourceforge.net/tutorial.html#figs_and_axes JDH
Hi I display two data vectors : the first is in the subplot 2,1,1 and the second in the subplot 2,1,2. Each of the data vectors have an x vector of dates to display values on x axis. The 2 data vectors are correlated in time and I want to show the correlation. But the two data vectors are not aligned as I wanted them to be since the data vector of subplot 2,1,2 have less element than the other one. I can't use the same x vector for both curves since it would force me to add empty values in the second data vector. And I don't want to do that since it would add useless points in my curve. So I need to find a way to allow me to align both data vectors on the different subplots without adding point to the data vector with a smaller number of elements. Thanks Johan
Le mardi 10 juin 2008 à 09:27 -0400, Tony S Yu a écrit : > Wow, a question I can actually answer: > > ax1 = subplot(211) > ax2 = subplot(212) > ax1.plot([1,2,3]) > ax2.plot([4,3,2]) > ax1.plot([3,2,1]) I do prefer Tony's solution, but in a more pylab'ic (matlab'ic) way, there is also: gcf().get_axes()[N].plot(...) where N is the subplot you wan to access (starting from N=0).
Hey Mark, Actually, recalling subplot(211) seems to work for me. Strange. You may want to try forcing the first plot to remain before drawing the second: subplot(211) plot([1,2,3]) hold(True) subplot(212) plot([4,3,2]) subplot(211) plot([3,2,1]) -Tony On Jun 10, 2008, at 9:29 AM, Mark Bakker wrote: > Thanks Tony - > > I was hoping there was a plyab-ish command. > Like you can do Figure(1), Figure(2), and then reselect Figure(1) to > get access to the first figure. No such command for subplot, I > understand. > > Cheers, Mark > > On Tue, Jun 10, 2008 at 3:27 PM, Tony S Yu <to...@mi...> wrote: > Wow, a question I can actually answer: > > ax1 = subplot(211) > ax2 = subplot(212) > ax1.plot([1,2,3]) > ax2.plot([4,3,2]) > ax1.plot([3,2,1]) > > Best, > -Tony > > > On Jun 10, 2008, at 9:09 AM, Mark Bakker wrote: > > Hello list - > > I want to plot something in two subplots, then add something to the > first subplot. > How do I select the first subplot after I have plotted on the second > subplot? > > For example: > subplot(211) > plot([1,2,3]) > subplot(212) > plot([4,3,2]) > > Now I want to add something to the first subplot. > So I thought I could do subplot(211) again, but that destroys the > subplot. > Any suggestions? > > Thanks, Mark > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Thanks Tony - I was hoping there was a plyab-ish command. Like you can do Figure(1), Figure(2), and then reselect Figure(1) to get access to the first figure. No such command for subplot, I understand. Cheers, Mark On Tue, Jun 10, 2008 at 3:27 PM, Tony S Yu <to...@mi...> wrote: > Wow, a question I can actually answer: > > ax1 = subplot(211) > ax2 = subplot(212) > ax1.plot([1,2,3]) > ax2.plot([4,3,2]) > ax1.plot([3,2,1]) > > Best, > -Tony > > > On Jun 10, 2008, at 9:09 AM, Mark Bakker wrote: > > Hello list - >> >> I want to plot something in two subplots, then add something to the first >> subplot. >> How do I select the first subplot after I have plotted on the second >> subplot? >> >> For example: >> subplot(211) >> plot([1,2,3]) >> subplot(212) >> plot([4,3,2]) >> >> Now I want to add something to the first subplot. >> So I thought I could do subplot(211) again, but that destroys the subplot. >> Any suggestions? >> >> Thanks, Mark >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> >> http://sourceforge.net/services/buy/index.php_______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > >
Wow, a question I can actually answer: ax1 = subplot(211) ax2 = subplot(212) ax1.plot([1,2,3]) ax2.plot([4,3,2]) ax1.plot([3,2,1]) Best, -Tony On Jun 10, 2008, at 9:09 AM, Mark Bakker wrote: > Hello list - > > I want to plot something in two subplots, then add something to the > first subplot. > How do I select the first subplot after I have plotted on the second > subplot? > > For example: > subplot(211) > plot([1,2,3]) > subplot(212) > plot([4,3,2]) > > Now I want to add something to the first subplot. > So I thought I could do subplot(211) again, but that destroys the > subplot. > Any suggestions? > > Thanks, Mark > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users