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
(13) |
2
(11) |
3
|
4
(9) |
|
5
(3) |
6
(17) |
7
(24) |
8
(11) |
9
(26) |
10
(19) |
11
(4) |
|
12
(4) |
13
(14) |
14
(9) |
15
(5) |
16
(18) |
17
(23) |
18
(3) |
|
19
(1) |
20
(7) |
21
(27) |
22
(26) |
23
(6) |
24
(17) |
25
(1) |
|
26
|
27
(7) |
28
(1) |
29
(4) |
30
(5) |
|
|
|
From: Christopher B. <Chr...@no...> - 2006-11-09 23:59:52
|
Russell E. Owen wrote: > I reinstalled wxPython 2.7 from the package at pythonmac.org (to be > paranoid). I'm using the Python 2.5 version. check > I got wx-config on my path and confirmed it's the right one (see below > for details). check. > Now when I try to build matplotlib it fails. Ouch. > > It starts out with the same warning as last time: > setup.py:267: DeprecationWarning: The wxPython compatibility package is > no longer automatically generated or activly maintained. Please switch > to the wx package as soon as possible. > import wxPython This one is easy! In setup.py, replace: import wxPython with import wx A few versions ago, the "import wxPython" form was deprecated -- it is now gone in 2.7. IN this case, all it's doing it checking if wxPython is installed, so th import wx should be the only change needed. A quick search revealed that the back-end itself has been switched over already. -Chris PS: you haven't been sending your notes to the list. -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Christopher B. <Chr...@no...> - 2006-11-09 23:27:07
|
Russell E Owen wrote:
> It turns out my wx-config was in:
> /usr/local/lib/wxPython-unicode-2.7.1.3/lib/wx/config/mac-unicode-debug-2.7
> not a location I'd ever have expected or would want to add to my $PATH
> (and not easy to find -- I had to use a special file finding utility to
> find it).
>
> No wonder I was having problems!
>
> Do you know who produced the wxPython installer package?
Robin Dunn builds those himself.
> If so, please
> tell me or feel free to forward this message (edited as you see fit). I
> want to suggest they put links to binaries in one of:
> - /usr/local/bin
> - /Library/Frameworks/Python.../bin
>
> I think the former is the right choice if the associated wx C++
> libraries (as installed by wxPython) are accessible to C++ users.
They are really intended to be used specifically by wxPython. Often they
are slightly different versions. I now when I've used wx for C++, I've
used different libs.
> Otherwise if it's really a python-private sort of thing then it should
> probably be the latter.
I think so. But there is a problem there, too. As I mentioned, you can
have different versions of wxPython installed at once, so which one
would put it's wx-config there?
Also, /Library/Frameworks/Python.../bin is the default locations for
binaries on OS-X, set by dist-utils. On other systems, it's set to
/usr/local, or who knows? In that case, putting wx-config there could
clash with both C++ wx installations, and wxPythons used for different
versions of python -- there's just no easy way. At least this way, when
you pick that wx-config, you KNOW you've got the one you want.
As far as MPL is concerned, we could write a little code that would
search for the default wxPython, and find wx-config there.
However, the better solution is really to get rid of the compile-time
dependence on wx -- that's a problem anyway. For instance, I'm not sure
we should make the pythonmac binary depend on wxPython 2.7 -- that is a
development version -- 2.6.3 may be a better choice.
If only we all didn't have other things to do...
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
|
|
From: Andrea G. <and...@gm...> - 2006-11-09 23:22:28
|
Hi, > * You need PyNum (documented) I suppose you meant NumPy > * You need wxPython (not documented that I've found) No, I don't remember that particular need, unless things have changed in the meanwhile. If so, please correct my ignorance. > Python 2.4.3 (#1, Mar 30 2006, 11:02:16) > [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> from pylab import * > >>> dt = 0.01 > >>> t = arrange(0,10,dt) > Traceback (most recent call last): > File "<stdin>", line 1, in ? > NameError: name 'arrange' is not defined I suppose you meant "arange" and not "arrange". Andrea. "Imagination Is The Only Weapon In The War Against Reality." http://xoomer.virgilio.it/infinity77/ |
|
From: Simson G. <si...@ac...> - 2006-11-09 23:18:35
|
I'm new to matplotlib; I was using PyX but matplotlib seems further developed for what I want to do. One of the problems that I'm having is simply getting started. I've discovered that there are a whole bunch of dependencies that weren't obvious in the manual: * You need PyNum (documented) * You need wxPython (not documented that I've found) Nevertheless, I'm still having problems. The example in the beginning of the manual doesn't work for me; array() is undefined: % python Python 2.4.3 (#1, Mar 30 2006, 11:02:16) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from pylab import * >>> dt = 0.01 >>> t = arrange(0,10,dt) Traceback (most recent call last): File "<stdin>", line 1, in ? NameError: name 'arrange' is not defined >>> I'm using a MacOS machine running 10.4. Any suggestions? |
|
From: Fernando P. <fpe...@gm...> - 2006-11-09 22:43:08
|
On 11/9/06, Angus McMorland <am...@gm...> wrote: > Since this is the third time I've seen this question pop up in a few > months, I've put an entry in the wiki for it here > (http://www.scipy.org/Cookbook/Matplotlib/DeletingAnExistingDataSeries). > Fernando, I hope you don't mind me using your example on the page - it > seemed the most thorough. How dare you! I'm going to sue for copyright theft! ;-) Thanks for the wiki entry, it's certainly a common need. Regards, f |
|
From: Fernando P. <fpe...@gm...> - 2006-11-09 22:41:41
|
On 11/9/06, John Hunter <jdh...@ac...> wrote: > >>>>> "Andrea" == Andrea Gavana <and...@gm...> writes: > > Andrea> Thank you guys, and thanks for the Wiki entry ;-) Andrea. > > Since ax.lines is just a list, you can also use the "remove" method > > line1, = ax.plot(something) > line2, = ax.plot(somethingelse) > line3, line4 = ax.plot(x3, y3, x4, y4) > > ax.lines.remove(line3) With the caveat that I think this is O(N) in the length of the list, with comparison operations at each step. I think 'del alist[i]' is also O(N), but amortized and with *much* smaller constant (only cheap internal pointer shuffling, without any real Python work). Someone with better knowledge of the list object internals, feel free to correct the above (I'm actually curious if the reality is different). Cheers, f |
|
From: Christopher B. <Chr...@no...> - 2006-11-09 22:04:33
|
Russell E Owen wrote:
> There are two issues:
> 1) The wxPython installer is finding the wrong wx-config. It finds
> the one for the outdated built-in wx instead of the one used by
> wxPython (which is deeply buried and very unlikely to be on your
> $PATH).
> 2) There are bugs in the particular wxPython 2.7 I was using that
> prevent building matplotlib. Note that 2.7.x is, by definition, a
> development branch; the next stable release series will be 2.8.x.
I'm not sure if it's a bug in wxPython 2.7 -- or a bug in the wxAgg code
that happens to be triggered by 2.7...
> - Put its wx-config on your path. I did this as follows:
> sudo ln -s
> /usr/local/lib/wxPython-unicode-2.6.3.3/lib/wx/config/mac-unicode-debug-2.6
The other option is to set an environment variable, before running setup.py:
(bash syntax)
export WX_CONFIG=/usr/local/lib/wxPython-unicode-2.6.3.3/bin/wx-config
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
|
|
From: John H. <jdh...@ac...> - 2006-11-09 21:49:06
|
>>>>> "Andrea" == Andrea Gavana <and...@gm...> writes:
Andrea> Thank you guys, and thanks for the Wiki entry ;-) Andrea.
Since ax.lines is just a list, you can also use the "remove" method
line1, = ax.plot(something)
line2, = ax.plot(somethingelse)
line3, line4 = ax.plot(x3, y3, x4, y4)
ax.lines.remove(line3)
JDH
|
|
From: Andrea G. <and...@gm...> - 2006-11-09 21:42:33
|
Thank you guys, and thanks for the Wiki entry ;-) Andrea. On 11/9/06, Pierre GM <pgm...@gm...> wrote: > > > I have a GUI written in wxPython, the main portion of it is a > > matplotlib canvas. There is a tree control on the left with > > checkboxes: if the user checks a checkbox, I add a line on the plot. > > So far so good. The problem comes when the user *un-checks* the > > checkbox. I would like to remove the line from the plot, but the only > > way I found to do it is to do: > > To suppress the last line drawn: > del(gca().lines[-1]) > > (replace gca() by the handle of the subplot you're acting on) > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Andrea. "Imagination Is The Only Weapon In The War Against Reality." http://xoomer.virgilio.it/infinity77/ |
|
From: Angus M. <am...@gm...> - 2006-11-09 21:39:35
|
On 10/11/06, Dan Karipides <ka...@tx...> wrote: > Fernando, > > Thanks, this is exactly what I need. > > BTW, I think I missed it in the search because the archive here: > > http://sourceforge.net/mailarchive/forum.php?forum_id=33405 > > doesn't show anything more recent that 10/02/2006. I'm not sure why this > is. > > Thanks again, > > -Dan > ----- > ka...@tx... > Since this is the third time I've seen this question pop up in a few months, I've put an entry in the wiki for it here (http://www.scipy.org/Cookbook/Matplotlib/DeletingAnExistingDataSeries). Fernando, I hope you don't mind me using your example on the page - it seemed the most thorough. A. -- AJC McMorland, PhD Student Physiology, University of Auckland |
|
From: Christopher B. <Chr...@no...> - 2006-11-09 21:23:46
|
Russell and Charlie,
Are your two binaries any different? Any reason to choose one over the
other? In particular, which of these are supported:
numpy 1.*
Numeric
numarray
GTK
TK
wx (which version?)
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
|
|
From: Charlie M. <cw...@gm...> - 2006-11-09 20:17:10
|
On 11/9/06, Russell E Owen <ro...@ce...> wrote: > At 10:18 AM -0800 2006-11-09, Christopher Barker wrote: > >Russell and Charlie, > > > >Are your two binaries any different? Any reason to choose one over > >the other? In particular, which of these are supported: > > > >numpy 1.* > >Numeric > >numarray > > > >GTK > >TK > >wx (which version?) > > My binary supports: > - numpy 1.0 (the default), Numeric and numarray > - TkAgg using the built in Tcl/Tk or a user-added Tcl/Tk 8.4.x > - WXAgg using wxPython 2.6 > (I just realized this is the default, which is bad because it's not built in) > > It does not support GTK or Qt. > > Unfortunately it requires the user to: > - Install one or more numeric packages > - Set up a matploblibrc file unless they want to use numpy and WXAgg > so it includes a ReadMe.txt file telling the user what to do. > > It would be better if matplotlib "just ran" out of the box. I'm not > sure the best way to do this. Some possibilities are: > - Include numpy in the matplotlib package and have the default > matplotlibrc file use that. One would have to be careful about how to > handle an existing numpy (if any), and I really don't know how to do > that. Naive users would probably appreciate matplotlib using its own > version and ignoring any built in (and possibly incompatible) > version, but that sounds like a nightmare for more experienced users. > > - Run a post-install script that modifies the default matploblibrc > file by looking for installed numeric packages and picking one as the > default for numerix. It could warn the user if no compatible numeric > package was found. This is clearly less friendly than the first > option, but doesn't bring up the issue of conflicting with a > user-installed numpy. > > - Some combination whereby a post-install script installs numpy 1.0 > if no numpy is found and bitches loudly if a too-old version is found. > > Any ideas on this? Charlie: does your version already handle this somehow? > > > If we use my package then I should submit a new version that has > TkAgg as its default. I am guessing our versions are pretty much the same. All the latest numerical modules, no gtk, etc. I don't think we need to worry about dependencies. Windows and linux doesn't technically run out of the box either. They are required to get the correct deps. |
|
From: Tom D. <tom...@al...> - 2006-11-09 18:58:46
|
Thanks Eric.
On 11/9/06, Eric Firing <ef...@ha...> wrote:
>
> Tom,
>
> This is a bug. It looks like I completely forgot about handling alpha
> when I rewrote the colorbar code. I will try to get it fixed in the
> next few days. Thanks for the report.
>
> Eric
>
> Tom Denniston wrote:
> > When I use contourf with an alpha argument and the "hot" color scheme.
> > The alpha causes the colors to come out lighter but the colorbar does
> > not adjust accordingly. Is this a bug or do I simply need to adjust the
> > colorbar in some manner?
> >
> >
> >
> > Below is an adaptation of pcolor.py from the screenshots page and
> > attached is the output I see.
> >
> > I am using matplotlib 0.87.7:
> >
> > In [3]: matplotlib.__version__
> > Out[3]: '0.87.7'
> >
> > --------------------------------------------------
> >
> >
> >
> >
> > from __future__ import division
> > from pylab import *
> >
> > def func3(x,y):
> > return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2)
> >
> > dx, dy = 0.025, 0.025
> > x = arange(-3.0, 3.0, dx)
> > y = arange(-3.0, 3.0, dy)
> > X,Y = meshgrid(x, y)
> >
> > Z = func3(X, Y)
> >
> >
> > cset = contourf(Z, arange(-1.2,1.6,0.5),
> > origin='lower',
> > extent=(-3,3,-3,3), alpha=.5
> > )
> >
> >
> > axis('off')
> > hot()
> > colorbar()
> > title('Some like it hot')
> > show('example')
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services,
> security?
> > Get stuff done quickly with pre-integrated technology to make your job
> easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Eric F. <ef...@ha...> - 2006-11-09 18:47:58
|
Tom,
This is a bug. It looks like I completely forgot about handling alpha
when I rewrote the colorbar code. I will try to get it fixed in the
next few days. Thanks for the report.
Eric
Tom Denniston wrote:
> When I use contourf with an alpha argument and the "hot" color scheme.
> The alpha causes the colors to come out lighter but the colorbar does
> not adjust accordingly. Is this a bug or do I simply need to adjust the
> colorbar in some manner?
>
>
>
> Below is an adaptation of pcolor.py from the screenshots page and
> attached is the output I see.
>
> I am using matplotlib 0.87.7:
>
> In [3]: matplotlib.__version__
> Out[3]: '0.87.7'
>
> --------------------------------------------------
>
>
>
>
> from __future__ import division
> from pylab import *
>
> def func3(x,y):
> return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2)
>
> dx, dy = 0.025, 0.025
> x = arange(-3.0, 3.0, dx)
> y = arange(-3.0, 3.0, dy)
> X,Y = meshgrid(x, y)
>
> Z = func3(X, Y)
>
>
> cset = contourf(Z, arange(-1.2,1.6,0.5),
> origin='lower',
> extent=(-3,3,-3,3), alpha=.5
> )
>
>
> axis('off')
> hot()
> colorbar()
> title('Some like it hot')
> show('example')
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Russell E O. <ro...@ce...> - 2006-11-09 18:46:40
|
At 10:18 AM -0800 2006-11-09, Christopher Barker wrote: >Russell and Charlie, > >Are your two binaries any different? Any reason to choose one over >the other? In particular, which of these are supported: > >numpy 1.* >Numeric >numarray > >GTK >TK >wx (which version?) My binary supports: - numpy 1.0 (the default), Numeric and numarray - TkAgg using the built in Tcl/Tk or a user-added Tcl/Tk 8.4.x - WXAgg using wxPython 2.6 (I just realized this is the default, which is bad because it's not built in) It does not support GTK or Qt. Unfortunately it requires the user to: - Install one or more numeric packages - Set up a matploblibrc file unless they want to use numpy and WXAgg so it includes a ReadMe.txt file telling the user what to do. It would be better if matplotlib "just ran" out of the box. I'm not sure the best way to do this. Some possibilities are: - Include numpy in the matplotlib package and have the default matplotlibrc file use that. One would have to be careful about how to handle an existing numpy (if any), and I really don't know how to do that. Naive users would probably appreciate matplotlib using its own version and ignoring any built in (and possibly incompatible) version, but that sounds like a nightmare for more experienced users. - Run a post-install script that modifies the default matploblibrc file by looking for installed numeric packages and picking one as the default for numerix. It could warn the user if no compatible numeric package was found. This is clearly less friendly than the first option, but doesn't bring up the issue of conflicting with a user-installed numpy. - Some combination whereby a post-install script installs numpy 1.0 if no numpy is found and bitches loudly if a too-old version is found. Any ideas on this? Charlie: does your version already handle this somehow? If we use my package then I should submit a new version that has TkAgg as its default. -- Russell |
|
From: Dan K. <ka...@tx...> - 2006-11-09 17:05:51
|
Fernando, Thanks, this is exactly what I need. BTW, I think I missed it in the search because the archive here: http://sourceforge.net/mailarchive/forum.php?forum_id=33405 doesn't show anything more recent that 10/02/2006. I'm not sure why this is. Thanks again, -Dan ----- ka...@tx... -----Original Message----- From: Fernando Perez [mailto:fpe...@gm...] Sent: Thursday, November 09, 2006 9:46 AM To: Dan Karipides Cc: mat...@li... Subject: Re: [Matplotlib-users] Removing a data series Hi Dan, On 11/9/06, Dan Karipides <ka...@tx...> wrote: > I did my best to search the examples, mailing list, etc. but was surprised > that I didn't even find this question asked, let alone answered. Coincidentally it was asked just yesterday by Andrea Gavana, but you may have missed it in your search (it may have crossed with your posting time). > My basic question: Is it possible to remove a data series from a matplotlib > plot? Here is a little self-contained example you can try (N==numpy, P=pylab): In [24]: x = N.arange(10) In [25]: fig = P.figure() In [26]: ax = fig.add_subplot(111) In [27]: ax.plot(x) Out[27]: [<matplotlib.lines.Line2D instance at 0x427ce7ec>] In [28]: ax.plot(x+10) Out[28]: [<matplotlib.lines.Line2D instance at 0x427ce88c>] In [29]: ax.plot(x+20) Out[29]: [<matplotlib.lines.Line2D instance at 0x427ce9ac>] In [30]: P.show() In [31]: ax.lines Out[31]: [<matplotlib.lines.Line2D instance at 0x427ce7ec>, <matplotlib.lines.Line2D instance at 0x427ce88c>, <matplotlib.lines.Line2D instance at 0x427ce9ac>] In [32]: del ax.lines[1] In [33]: P.show() This makes the middle line disappear from the plot. Regards, f |
|
From: Jean-Luc M. <jea...@fr...> - 2006-11-09 17:02:04
|
Hello all, After some hour of fighting with, I've found that legend had some trouble when used with errobar because errorbar return a tuple. I know that is not a bug but I think it might be a good idea to write a warning about in the documentation (I mean at http://matplotlib.sourceforge.net/matplotlib.pylab.html#-legend). Jean-Luc PS: by the way, thanks to the developers of matplotlib for their great work. |
|
From: Pierre GM <pgm...@ma...> - 2006-11-09 16:47:12
|
> My basic question: Is it possible to remove a data series from a matplotlib > plot? A quite similar question was asked yesterday: The lines are stored in "ax.lines", by chronological order. If you want to delete the second one, just use del(ax.lines[1]), and redraw if needed. |
|
From: Fernando P. <fpe...@gm...> - 2006-11-09 16:45:59
|
Hi Dan, On 11/9/06, Dan Karipides <ka...@tx...> wrote: > I did my best to search the examples, mailing list, etc. but was surprised > that I didn't even find this question asked, let alone answered. Coincidentally it was asked just yesterday by Andrea Gavana, but you may have missed it in your search (it may have crossed with your posting time). > My basic question: Is it possible to remove a data series from a matplotlib > plot? Here is a little self-contained example you can try (N==numpy, P=pylab): In [24]: x = N.arange(10) In [25]: fig = P.figure() In [26]: ax = fig.add_subplot(111) In [27]: ax.plot(x) Out[27]: [<matplotlib.lines.Line2D instance at 0x427ce7ec>] In [28]: ax.plot(x+10) Out[28]: [<matplotlib.lines.Line2D instance at 0x427ce88c>] In [29]: ax.plot(x+20) Out[29]: [<matplotlib.lines.Line2D instance at 0x427ce9ac>] In [30]: P.show() In [31]: ax.lines Out[31]: [<matplotlib.lines.Line2D instance at 0x427ce7ec>, <matplotlib.lines.Line2D instance at 0x427ce88c>, <matplotlib.lines.Line2D instance at 0x427ce9ac>] In [32]: del ax.lines[1] In [33]: P.show() This makes the middle line disappear from the plot. Regards, f |
|
From: Jean-Luc M. <Jea...@ob...> - 2006-11-09 16:45:03
|
Hello all, After some hour of fighting with, I've found that legend had some trouble when used with errobar because errorbar return a tuple. I know that is not a bug but I think it might be a good idea to write a warning about in the documentation (I mean at http://matplotlib.sourceforge.net/matplotlib.pylab.html#-legend). Jean-Luc PS: by the way, thanks to the developers of matplotlib for their great work. |
|
From: Dan K. <ka...@tx...> - 2006-11-09 15:40:54
|
I did my best to search the examples, mailing list, etc. but was surprised
that I didn't even find this question asked, let alone answered.
My basic question: Is it possible to remove a data series from a matplotlib
plot?
Longer question:
I'm using matplotlib to generate graph images for an interactive web site.
Through the web site, the user can create a plot and add data series to it.
I'd also like the user to be able to remove a data series. At the moment, I
am accomplishing this by clearing the plot and replotting all the data
series except of course for the one to be removed. This seems inefficient.
So something like:
fig = Figure()
ax = fig.add_subplot(111)
series1 = ax.plot(<some plot parameters here>)
series2 = ax.plot(<some plot parameters here>)
series3 = ax.plot(<some plot parameters here>)
And now I want to remove series2 from the plot.
Is this possible? If it is, can anyone point me to the relevant part of the
user's guide/class library? Or is the best approach to clear the plot and
replot 1 and 3 (and reset all the axes, legends, etc.)
I apologize if this is a FAQ, but as I said, my search for it came up empty.
Thanks,
-Dan
------
ka...@tx...
|
|
From: Charlie M. <cw...@gm...> - 2006-11-09 02:18:41
|
> >Otherwise, Charlie Moad was building binaries -- I wonder what's > >become of him? Been busy... ;) I posted the mac binaries last night. |
|
From: Pierre GM <pgm...@gm...> - 2006-11-09 02:14:45
|
> I have a GUI written in wxPython, the main portion of it is a > matplotlib canvas. There is a tree control on the left with > checkboxes: if the user checks a checkbox, I add a line on the plot. > So far so good. The problem comes when the user *un-checks* the > checkbox. I would like to remove the line from the plot, but the only > way I found to do it is to do: To suppress the last line drawn: del(gca().lines[-1]) (replace gca() by the handle of the subplot you're acting on) |
|
From: Russell E O. <ro...@ce...> - 2006-11-09 01:37:05
|
At 4:10 PM -0800 2006-11-08, Christopher Barker wrote: >I just tried to compile MPL with wxPython 2.7 -- and remembered why I >hadn't done it in a while -- I don't have Universal version of libpng >and libfreetype, and I don't know how to make or have the time to figure >it out. I would be happy to send them to you if you want them. >Maybe wxPython 2.6 will work for you -- let's hope so. It did. Thanks! I initially had wx-config pointing to the wrong place (probably the version for Python 2.4) so had some "interesting" errors, but I threw some stuff out and corrected the problem and all was well. >Otherwise, Charlie Moad was building binaries -- I wonder what's >become of him? I may probably just got in first this time. I was keen to upgrade to python 2.5. >Anyway, I suppose my time would be better spent improving the >non-accelerated version -- I don't think it's really necessary and >it would make all this a lot easier! Sounds like a good bet. Though I also really like your idea of making the setup.py file smart enough to find the right wx-config. That would be a good quick fix (at least I think it would be quick) and would make building a lot more robust. Thank you again for all your help. I see you even found a fix for wxPython 2.7. I don't plan to try myself because I've got something that works, but it sounds like a good bug to fix! With any luck Bob Ippolito will have the improved matplotlib installer available soon at pythonmac.org. Regards, -- Russell |
|
From: Russell E O. <ro...@ce...> - 2006-11-09 01:28:35
|
I build matplotlib 0.87.7 for Python 2.5 with support for TkAgg and WXAgg, the latter using the binary wxPython 2.7 installer from <http://pythonmac.org/packages>. Unfortunately, the matplotlib had a problem: WxAgg failed with: MemoryError: _wxagg.convert_agg_to_wx_bitmap(): could not create the wx.Bitmap Disaabling acceleration as follows seems to work around the problem, but I don't know how complete a fix it is: import matplotlib.backends.backend_wxagg matplotlib.backends.backend_wxagg._use_accelerator(False) Christopher Barker was immensely helpful in explaining what was wrong. There are two issues: 1) The wxPython installer is finding the wrong wx-config. It finds the one for the outdated built-in wx instead of the one used by wxPython (which is deeply buried and very unlikely to be on your $PATH). 2) There are bugs in the particular wxPython 2.7 I was using that prevent building matplotlib. Note that 2.7.x is, by definition, a development branch; the next stable release series will be 2.8.x. So the recipe that works is: - Install wxPython 2.6.x (preferably the unicode version) from <http://www.wxpython.org/download-2.6.3.3.php#binaries> or perhaps soon from: <http://pythonmac.org/packages/> - Put its wx-config on your path. I did this as follows: sudo ln -s /usr/local/lib/wxPython-unicode-2.6.3.3/lib/wx/config/mac-unicode-debug-2.6 I suggest removing the link when finished since it won't be updated if you ever update wxPython. (Note: I found the correct file by looking for wx-config using File Buddy). - Install one or more numeric of numpy, numarray and/or Numeric Binary installers are available at <http://pythonmac.org/packages/> - Build matplotlib as usual. -- Russell |