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
(10) |
2
(12) |
3
(6) |
4
(5) |
5
(6) |
6
(2) |
7
(1) |
8
(20) |
9
(11) |
10
(3) |
11
(6) |
12
(3) |
13
(1) |
14
(2) |
15
(1) |
16
(5) |
17
(9) |
18
(17) |
19
(7) |
20
|
21
(1) |
22
(1) |
23
(1) |
24
|
25
(4) |
26
(4) |
27
|
28
(2) |
29
(2) |
30
(6) |
31
(5) |
|
|
|
From: Gary P. <pa...@in...> - 2004-03-17 20:53:40
|
Thanks very much, guys! -Gary ----- Original Message ----- From: "Todd Miller" <jm...@st...> To: "John Hunter" <jdh...@ni...> Cc: "Gary Pajer" <pa...@in...>; <mat...@li...> Sent: Wednesday, March 17, 2004 11:38 AM Subject: Re: [Matplotlib-users] TkAgg in a Tkinter GUI frame? > On Tue, 2004-03-16 at 07:29, John Hunter wrote: > > >>>>> "Gary" == Gary Pajer <pa...@in...> writes: > > > > Gary> I've been poking aroung a bit trying to see if I can locate > > Gary> my plots in a frame in my own Tkinter GUI rather than a > > Gary> stand-alone window. > > > > Gary> It looks like it might be possible if I can, for example, > > Gary> extract the frame instance from a TkAgg plot (or something > > Gary> like that) > > > > Gary> Can anyone comment or suggest a route? > > > > Todd, is this easily doable? > > As we all hoped, this was easy and is now in CVS. I refactored > FigureManagerTkAgg and added FigureCanvasTkAgg to support the new > functionality. FigureCanvasTkAgg defines get_tk_widget() to return > whatever tk widget is used to implement it. Currently it returns a Tk > canvas but I thought it would be best not to assume that will always be > the case. Like other Tk widgets, FigureCanvasTkAgg wants to be told > who its parent widget (master) is at construction time. > > > Could you write an embedding_in_tk.py > > example along the lines of embedding_in_gtk and embedding_in_wx? > > This is also in CVS. > > > > Regards, > Todd > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > GenToo technologies. Learn everything from fundamentals to system > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- > Todd Miller <jm...@st...> > |
From: Todd M. <jm...@st...> - 2004-03-17 19:19:20
|
On Wed, 2004-03-17 at 11:24, John Hunter wrote: > >>>>> "Todd" == Todd Miller <jm...@st...> writes: > > Todd> This is also in CVS. > > Nice work! > > In a quick test, the only thing I noticed is that the figure window > does not resize when embedded but does on a normal plot. I don't know > if this is a bug or a feature :-). I implemented this since you brought it up and I think the new way qualifies as a feature. The widget packing can be used to drive either kind of behavior: resize-able or not-resize-able. The demo now resizes. Regards, Todd > In backend_gtk, I handle the > configure event in the FigureCanvas. > > Gary, if you need a src snapshot (the regular CVS mirrors can lag > sometimes by a couple of days), let me know. > > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Todd Miller <jm...@st...> |
From: John H. <jdh...@ac...> - 2004-03-17 16:47:02
|
>>>>> "Todd" == Todd Miller <jm...@st...> writes: Todd> This is also in CVS. Nice work! In a quick test, the only thing I noticed is that the figure window does not resize when embedded but does on a normal plot. I don't know if this is a bug or a feature :-). In backend_gtk, I handle the configure event in the FigureCanvas. Gary, if you need a src snapshot (the regular CVS mirrors can lag sometimes by a couple of days), let me know. JDH |
From: Todd M. <jm...@st...> - 2004-03-17 16:41:30
|
On Tue, 2004-03-16 at 07:29, John Hunter wrote: > >>>>> "Gary" == Gary Pajer <pa...@in...> writes: > > Gary> I've been poking aroung a bit trying to see if I can locate > Gary> my plots in a frame in my own Tkinter GUI rather than a > Gary> stand-alone window. > > Gary> It looks like it might be possible if I can, for example, > Gary> extract the frame instance from a TkAgg plot (or something > Gary> like that) > > Gary> Can anyone comment or suggest a route? > > Todd, is this easily doable? As we all hoped, this was easy and is now in CVS. I refactored FigureManagerTkAgg and added FigureCanvasTkAgg to support the new functionality. FigureCanvasTkAgg defines get_tk_widget() to return whatever tk widget is used to implement it. Currently it returns a Tk canvas but I thought it would be best not to assume that will always be the case. Like other Tk widgets, FigureCanvasTkAgg wants to be told who its parent widget (master) is at construction time. > Could you write an embedding_in_tk.py > example along the lines of embedding_in_gtk and embedding_in_wx? This is also in CVS. > Regards, Todd > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Todd Miller <jm...@st...> |
From: Jean-Baptiste C. <Jea...@de...> - 2004-03-17 16:12:55
|
It worked gret Thanks Jean-Baptiste On Wed, 17 Mar 2004 18:33:52 +0800 LUK ShunTim <shu...@po...> wrote: > Jean-Baptiste Cazier wrote: > > S=E6l ! > >=20 > >=20 > > I am trying to keep up with the versions of matplotlib by sucessively = installing them.=20 > > However I have to install it on many workstations that share folders ov= er the network > >=20 > > I would like to be able to install matplotlib into such a folder to avo= id installing it every time on each machine, but only once > > It works fine with Numeric and other packages, but not with matplotlib: > >=20 > > - I install matplotlib on my own workstation. > > - I copied recursively the folder /usr/lib/python2.2/site-packages/ma= tplotlib into /home/stat/Pygtk/matplotlib > > - And then in my program I have added the location of the library to m= y path: > > sys.path.append("/home/stat/Pygtk/matplotlib") > >=20 > > But I get the error message > > [lws11] ~/devel/novi $ novi.py -m map mixed.test.header.out > > Traceback (most recent call last): > > File "./novi.py", line 19, in ? > > import matplotlib.matlab as Plot > > File "/home/stat/Pygtk/matplotlib/__init__.py", line 225, in ? > > defaultParams =3D { > > File "/home/stat/Pygtk/matplotlib/__init__.py", line 154, in get_data= _path > > raise RuntimeError('Could not find the matplotlib data files') > > RuntimeError: Could not find the matplotlib data files > >=20 > >=20 > > Which other folder do I need to install or set a path to ? > >=20 > > Thanks > >=20 > > Kve=F0ja > >=20 > > Jean-Baptiste > >=20 >=20 > Hello, >=20 > You may have to set the MATPLOTLIBDATA environmental variable to where=20 > you store the data (fonts etc) if you install in a non-default location. >=20 > Regards, > ST --=20 ----------------------------- Jea...@de... Department of Statistics deCODE genetics Sturlugata,8 570 2993 101 Reykjav=EDk |
From: LUK S. <shu...@po...> - 2004-03-17 10:31:39
|
Jean-Baptiste Cazier wrote: > Sæl ! > > > I am trying to keep up with the versions of matplotlib by sucessively installing them. > However I have to install it on many workstations that share folders over the network > > I would like to be able to install matplotlib into such a folder to avoid installing it every time on each machine, but only once > It works fine with Numeric and other packages, but not with matplotlib: > > - I install matplotlib on my own workstation. > - I copied recursively the folder /usr/lib/python2.2/site-packages/matplotlib into /home/stat/Pygtk/matplotlib > - And then in my program I have added the location of the library to my path: > sys.path.append("/home/stat/Pygtk/matplotlib") > > But I get the error message > [lws11] ~/devel/novi $ novi.py -m map mixed.test.header.out > Traceback (most recent call last): > File "./novi.py", line 19, in ? > import matplotlib.matlab as Plot > File "/home/stat/Pygtk/matplotlib/__init__.py", line 225, in ? > defaultParams = { > File "/home/stat/Pygtk/matplotlib/__init__.py", line 154, in get_data_path > raise RuntimeError('Could not find the matplotlib data files') > RuntimeError: Could not find the matplotlib data files > > > Which other folder do I need to install or set a path to ? > > Thanks > > Kveðja > > Jean-Baptiste > Hello, You may have to set the MATPLOTLIBDATA environmental variable to where you store the data (fonts etc) if you install in a non-default location. Regards, ST |
From: Jean-Baptiste C. <Jea...@de...> - 2004-03-17 08:42:50
|
S=E6l ! I am trying to keep up with the versions of matplotlib by sucessively inst= alling them.=20 However I have to install it on many workstations that share folders over t= he network I would like to be able to install matplotlib into such a folder to avoid i= nstalling it every time on each machine, but only once It works fine with Numeric and other packages, but not with matplotlib: - I install matplotlib on my own workstation. - I copied recursively the folder /usr/lib/python2.2/site-packages/matplo= tlib into /home/stat/Pygtk/matplotlib - And then in my program I have added the location of the library to my pa= th: sys.path.append("/home/stat/Pygtk/matplotlib") But I get the error message [lws11] ~/devel/novi $ novi.py -m map mixed.test.header.out Traceback (most recent call last): File "./novi.py", line 19, in ? import matplotlib.matlab as Plot File "/home/stat/Pygtk/matplotlib/__init__.py", line 225, in ? defaultParams =3D { File "/home/stat/Pygtk/matplotlib/__init__.py", line 154, in get_data_path raise RuntimeError('Could not find the matplotlib data files') RuntimeError: Could not find the matplotlib data files Which other folder do I need to install or set a path to ? Thanks Kve=F0ja Jean-Baptiste --=20 ----------------------------- Jea...@de... Department of Statistics deCODE genetics Sturlugata,8 570 2993 101 Reykjav=EDk |
From: Steve C. <ste...@ya...> - 2004-03-17 05:21:31
|
Hello, I sent a message to the numarray website to let them know that when they say "numarray lacks a plotting module" that's no longer true since matplotlib now works with numarray. However, when I looked at the matplotlib install page http://matplotlib.sourceforge.net/installing.html it currently says "matplotlib requires python 2.2+, Numeric." and further down "Note, you'll want the "numpy", not "numarray" files." I'm assuming the matplotlib support for numarray means that Numeric is no longer a requirement, is this true? If so it looks like the install page needs to be updated to avoid confusing numarray users. Regards Steve |
From: Todd M. <jm...@st...> - 2004-03-16 19:36:12
|
On Tue, 2004-03-16 at 07:29, John Hunter wrote: > >>>>> "Gary" == Gary Pajer <pa...@in...> writes: > > Gary> I've been poking aroung a bit trying to see if I can locate > Gary> my plots in a frame in my own Tkinter GUI rather than a > Gary> stand-alone window. > > Gary> It looks like it might be possible if I can, for example, > Gary> extract the frame instance from a TkAgg plot (or something > Gary> like that) > > Gary> Can anyone comment or suggest a route? > First an apology. I didn't see this until late yesterday when Perry alerted me. I wasn't subscribed to matplotlib-users. > Todd, is this easily doable? Frankly, I'm not sure. I'll try to work it out this afternoon. I imagine if it's possible in GTK it's possible in Tk. > Could you write an embedding_in_tk.py > example along the lines of embedding_in_gtk and embedding_in_wx? I'll try and let you know. > > The FigureCanvas derived instance in backend_* is meant to be a widget > you could plug into a GUI, but I notice you took a different tack in > backend_tkagg. The idea behind this is that users may want to embed a > figure as part of a GUI window, eg in a widget container, without > necessarily bringing the toolbar along or using the whole window. > Would this be an easy refactoring of backend_tkagg? We'll see. Regards, Todd -- Todd Miller <jm...@st...> |
From: John H. <jdh...@ac...> - 2004-03-16 19:11:19
|
What's new in matplotlib-0.52 Image support Basic image support. Images can be specified by Numeric float arrays imshow(X) If X is MxN, assume luminance (grayscale) If X is MxNx3, assume RGB If X is MxNx4, assume RGBA imshow(X, cmap) # plot X using colormap; see examples/pcolor_demo2.py see help(imshow) and the image_demo*.py examples in the matplotlib src distribution. Set BUILD_IMAGE in setup.py for image support. Currently available on Agg, GTKAgg, TkAgg and GTK backends. win32 GTK users should use GTKAgg unless your pygtk is compiled with Numeric support. The pseudocolor images generated with imshow are 8 million times faster than pcolors. Figure legends In addition to adding legends to the axes with the legend command, you can place legends anywhere in the figure with figlegend fill command Andrew Straw wrote a fill command to plot filled polygons. See fill_demo.py Make 2D spectrograms with specgram. Requires image support; see specgram_demo.py Bugfixes and minor improvements * Tk : Fixed a close figure bug in interactive mode * GTK : Much improved mathtext performance thanks to patch by Trevor Blackwell * All : Fixed a bug that showed up in successive calls to plot with just one plot argument Downloads at https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474&release_id=224080 |
From: John H. <jdh...@ac...> - 2004-03-16 13:07:07
|
>>>>> "matthew" == matthew arnison <ma...@ca...> writes: matthew> I can't seem to get multiple plots to draw on the same matthew> figure under TkAgg. In the below example, the cos() matthew> doesn't show up, and the tan produces an error. This matthew> seems to be repeatable for arbitrary cases of trying to matthew> plot 2 or 3 lines together on the one plot. Found and fixed. This crept into the functions that process plot arguments when I added matplotlibrc support there. In axes.py, search for def _plot_1_arg and replace the first part of it with def _plot_1_arg(self, y, **kwargs): if self.count==0: color = self.firstColor else: color = self.colors[int(self.count % self.Ncolors)] ^^^ this is the critical part matthew> Cheers and thanks for matplotlib, Matthew. Thanks for the bug report! JDH |
From: John H. <jdh...@ac...> - 2004-03-16 12:51:39
|
>>>>> "Gary" == Gary Pajer <pa...@in...> writes: Gary> I've been poking aroung a bit trying to see if I can locate Gary> my plots in a frame in my own Tkinter GUI rather than a Gary> stand-alone window. Gary> It looks like it might be possible if I can, for example, Gary> extract the frame instance from a TkAgg plot (or something Gary> like that) Gary> Can anyone comment or suggest a route? Todd, is this easily doable? Could you write an embedding_in_tk.py example along the lines of embedding_in_gtk and embedding_in_wx? The FigureCanvas derived instance in backend_* is meant to be a widget you could plug into a GUI, but I notice you took a different tack in backend_tkagg. The idea behind this is that users may want to embed a figure as part of a GUI window, eg in a widget container, without necessarily bringing the toolbar along or using the whole window. Would this be an easy refactoring of backend_tkagg? Thanks, JDH |
From: matthew a. <ma...@ca...> - 2004-03-16 07:01:52
|
I can't seem to get multiple plots to draw on the same figure under TkAgg. In the below example, the cos() doesn't show up, and the tan produces an error. This seems to be repeatable for arbitrary cases of trying to plot 2 or 3 lines together on the one plot. Cheers and thanks for matplotlib, Matthew. $ python Python 2.2.2 (#1, Feb 24 2003, 19:13:11) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from matplotlib.matlab import * >>> xx = arange(0, 3, 0.1) >>> plot(sin(xx)) [<matplotlib.lines.Line2D instance at 0x819613c>] >>> plot(cos(xx)) [<matplotlib.lines.Line2D instance at 0x8636444>] >>> plot(tan(xx)) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.2/site-packages/matplotlib/matlab.py", line 788, in plot draw_if_interactive() File "/usr/lib/python2.2/site-packages/matplotlib/backends/backend_tkagg.py", line 46, in draw_if_interactive figManager.show() File "/usr/lib/python2.2/site-packages/matplotlib/backends/backend_tkagg.py", line 127, in show self.canvas.draw() File "/usr/lib/python2.2/site-packages/matplotlib/backends/backend_agg.py", line 334, in draw self.figure.draw(self.renderer) File "/usr/lib/python2.2/site-packages/matplotlib/artist.py", line 79, in draw self._draw(renderer, *args, **kwargs) File "/usr/lib/python2.2/site-packages/matplotlib/figure.py", line 81, in _draw for a in self.axes: a.draw(renderer) File "/usr/lib/python2.2/site-packages/matplotlib/artist.py", line 79, in draw self._draw(renderer, *args, **kwargs) File "/usr/lib/python2.2/site-packages/matplotlib/axes.py", line 493, in _draw line.draw(renderer) File "/usr/lib/python2.2/site-packages/matplotlib/artist.py", line 79, in draw self._draw(renderer, *args, **kwargs) File "/usr/lib/python2.2/site-packages/matplotlib/lines.py", line 177, in _draw gc.set_foreground(self._color) File "/usr/lib/python2.2/site-packages/matplotlib/backend_bases.py", line 230, in set_foreground self._rgb = colorConverter.to_rgb(fg) File "/usr/lib/python2.2/site-packages/matplotlib/colors.py", line 82, in to_rgb error_msg(msg) NameError: global name 'error_msg' is not defined >>> |
From: Jean-Baptiste C. <Jea...@de...> - 2004-03-15 10:02:13
|
It workls great now ! Thanks Jean-Baptiste On Sun, 14 Mar 2004 13:26:20 -0600 John Hunter <jdh...@ni...> wrote: > >>>>> "Jean-Baptiste" =3D=3D Jean-Baptiste Cazier <Jean-Baptiste.cazier@d= ecode.is> writes: >=20 > lh=3Dlen(h.haplist) > Xrange=3D[map[m] for m in [y for x,y in h.haplist]] > Yrange=3D[-math.log10(h.pval) for i in range(lh)] > line=3Dcanvas.figure.axes[0].plot(Xrange, Yrange, symbol) > line.set_visible(Plot.False) >=20 > Jean-Baptiste> Any idea ? >=20 > plot always return *a list* of lines. So you need to do >=20 > lines =3D canvas.figure.axes[0].plot(Xrange, Yrange, symbol) > lines[0].set_visible(Plot.False) # get the first element of the list >=20 > JDH --=20 ----------------------------- Jea...@de... Department of Statistics deCODE genetics Sturlugata,8 570 2993 101 Reykjav=EDk |
From: John H. <jdh...@ac...> - 2004-03-14 19:48:39
|
>>>>> "Jean-Baptiste" == Jean-Baptiste Cazier <Jea...@de...> writes: lh=len(h.haplist) Xrange=[map[m] for m in [y for x,y in h.haplist]] Yrange=[-math.log10(h.pval) for i in range(lh)] line=canvas.figure.axes[0].plot(Xrange, Yrange, symbol) line.set_visible(Plot.False) Jean-Baptiste> Any idea ? plot always return *a list* of lines. So you need to do lines = canvas.figure.axes[0].plot(Xrange, Yrange, symbol) lines[0].set_visible(Plot.False) # get the first element of the list JDH |
From: Jean-Baptiste C. <Jea...@de...> - 2004-03-14 18:36:18
|
S=E6l ! Thanks for the change of the artist class. It should do exaclty what I want I modified artist accordingly (no more 'transform' defined ? I can run you example witout problem. But If I implement it in my program which is embedded within gtk with the o= bject_picker, it does not work: If I try to set_visible on lines I just define with plot I get an error mes= sage Traceback (most recent call last): File "./novi.py", line 604, in ? main() File "./novi.py", line 576, in main MaxP =3D plot_Haps(canvas, map, Haps) File "./novi.py", line 367, in plot_Haps line =3D plot_hap(canvas, map, h, sym[s]) File "./novi.py", line 389, in plot_hap line.set_visible(Plot.False) AttributeError: 'list' object has no attribute 'set_visible' And this happens even if I redo the full installation of matplotlib 0.51: ... not copying matplotlib/__init__.py (output up-to-date) not copying matplotlib/_matlab_helpers.py (output up-to-date) not copying matplotlib/afm.py (output up-to-date) copying matplotlib/artist.py -> build/lib/matplotlib not copying matplotlib/axes.py (output up-to-date) not copying matplotlib/axis.py (output up-to-date) ... running install_lib not copying build/lib/matplotlib/__init__.py (output up-to-date) not copying build/lib/matplotlib/_matlab_helpers.py (output up-to-date) not copying build/lib/matplotlib/afm.py (output up-to-date) copying build/lib/matplotlib/artist.py -> /usr/lib/python2.2/site-packages/= matplotlib not copying build/lib/matplotlib/axes.py (output up-to-date) not copying build/lib/matplotlib/axis.py (output up-to-date) not copying build/lib/matplotlib/backend_bases.py (output up-to .... skipping byte-compilation of /usr/lib/python2.2/site-packages/matplotlib/_m= atlab_helpers.py to _matlab_helpers.pyc skipping byte-compilation of /usr/lib/python2.2/site-packages/matplotlib/af= m.py to afm.pyc byte-compiling /usr/lib/python2.2/site-packages/matplotlib/artist.py to art= ist.pyc skipping byte-compilation of /usr/lib/python2.2/site-packages/matplotlib/ax= es.py to axes.pyc skipping byte-compilation of /usr/lib/python2.2/site-packages/matplotlib/ax= is.py to axis.pyc ... This is my routine: def plot_hap(canvas, map, h , symbol, size=3DNone): """ plot the specific haplotype """ lh=3Dlen(h.haplist) Xrange=3D[map[m] for m in [y for x,y in h.haplist]] Yrange=3D[-math.log10(h.pval) for i in range(lh)] line=3Dcanvas.figure.axes[0].plot(Xrange, Yrange, symbol) line.set_visible(Plot.False) return line Any idea ? Thanks Jean-Baptiste On Fri, 12 Mar 2004 12:29:18 -0600 John Hunter <jdh...@ni...> wrote: > >>>>> "Jean-Baptiste" =3D=3D Jean-Baptiste Cazier <Jean-Baptiste.cazier@d= ecode.is> writes: >=20 > Jean-Baptiste> S=E6l ! Is there a way to "turn-off" lines without > Jean-Baptiste> removing the data ? My goal is to hide some lines > Jean-Baptiste> in a plot wihtout losing the data so I can show it > Jean-Baptiste> again later. I can do # Hide the line > Jean-Baptiste> x=3Dline.get_xdata() y=3Dline.get_ydata() > Jean-Baptiste> line.set_data([],[]) >=20 > This can be done very easily (for any artist) with a minor > modification of artist.py. The base class forewards all drawing to > the derived classes so no other changes are required. Just replace > artist.py with the attached file below and then you can do: >=20 > from matplotlib.matlab import * >=20 > x =3D arange(0.0, 1.0, 0.05) > l1, l2 =3D plot(x, sin(2*pi*x), x, sin(4*pi*x)) > l1.set_visible(False) > show() >=20 >=20 --=20 ----------------------------- Jea...@de... Department of Statistics deCODE genetics Sturlugata,8 570 2993 101 Reykjav=EDk |
From: Gary P. <pa...@in...> - 2004-03-13 13:18:34
|
I've been poking aroung a bit trying to see if I can locate my plots in a frame in my own Tkinter GUI rather than a stand-alone window. It looks like it might be possible if I can, for example, extract the frame instance from a TkAgg plot (or something like that) Can anyone comment or suggest a route? -gary |
From: John H. <jdh...@ac...> - 2004-03-12 19:10:39
|
>>>>> "Jean-Baptiste" =3D=3D Jean-Baptiste Cazier <Jean-Baptiste.cazier@d= ecode.is> writes: Jean-Baptiste> S=E6l ! Is there a way to "turn-off" lines without Jean-Baptiste> removing the data ? My goal is to hide some lines Jean-Baptiste> in a plot wihtout losing the data so I can show it Jean-Baptiste> again later. I can do # Hide the line Jean-Baptiste> x=3Dline.get_xdata() y=3Dline.get_ydata() Jean-Baptiste> line.set_data([],[]) This can be done very easily (for any artist) with a minor modification of artist.py. The base class forewards all drawing to the derived classes so no other changes are required. Just replace artist.py with the attached file below and then you can do: from matplotlib.matlab import * x =3D arange(0.0, 1.0, 0.05) l1, l2 =3D plot(x, sin(2*pi*x), x, sin(4*pi*x)) l1.set_visible(False) show() |
From: Jean-Baptiste C. <Jea...@de...> - 2004-03-12 12:59:22
|
S=E6l ! Is there a way to "turn-off" lines without removing the data ? My goal is to hide some lines in a plot wihtout losing the data so I can sh= ow it again later. I can do=20 # Hide the line x=3Dline.get_xdata() y=3Dline.get_ydata() line.set_data([],[]) # Reset the line line.set_data(x,y) But I would prefer I more elegant way like line.hide() line.show() Would it be possible to get something like that ? Thanks Jean-Baptiste --=20 ----------------------------- Jea...@de... Department of Statistics deCODE genetics Sturlugata,8 570 2993 101 Reykjav=EDk |
From: Matt F. <mfi...@us...> - 2004-03-12 03:03:54
|
In order to "freeze" your matplotlib-0.51 application using the Agg backend into a standalone executable, the following are the steps you should take: 1. Write your setup.py file that py2exe will use for compiling. Example: # setup.py from distutils.core import setup import py2exe import glob data = glob.glob(r'C:\Python23\share\matplotlib\*') setup( console=["your_file.py"], data_files=[("share",data)] ) . Note that we use "data" here to copy the matplotlibdata "share" folder contents into your /dist/share directory. 2. Insert the following import statements into your_file.py, which is the file containing your matplotlib code: import matplotlib import matplotlib.ft2font import matplotlib.backends.backend_agg import ttfquery from matplotlib.matlab import * 3. Now we must take care of fonts. We're assuming that the machine we're installing to doesn't have the MATPLOTLIBDATA or TTFPATH environment variables set, so we must do the following: In ttfquery\_scriptregistry.py comment out these lines: ### more robust registry-file location by John Hunter... #if os.environ.has_key('HOME'): # registryFile = os.path.join( os.environ['HOME'], ".font.cache") #else: # OpenGLContext uses the Application Data directory for win32, # should consider porting that code here... # registryFile = os.path.join( os.path.split(__file__)[0], "font.cache") And replace with: registryFile = r'share\.font.cache' In matplotlib\__init__.py comment out these lines in the get_data_path() method: #path = os.path.join(distutils.sysconfig.PREFIX, 'share', 'matplotlib') #if os.path.isdir(path): return path #path = os.path.join(os.sep.join(__file__.split(os.sep)[:-5]), # 'share','matplotlib') #if os.path.isdir(path): return path #if os.environ.has_key('MATPLOTLIBDATA'): # path = os.environ['MATPLOTLIBDATA'] # if os.path.isdir(path): return path #raise RuntimeError('Could not find the matplotlib data files') And replace with: return 'share' Also, while you have __init__.py open, in defaultParams you should change the default backend to 'Agg' and default fontname to 'Vera' since it ships with matplotlib. 4. Copy your .font.cache file from /ttfquery into your matplotlibdata /share directory. Your system did a system scan of fonts to generate this file the first time that Agg was run but your "clean" system won't have it. By copying it to share, py2exe will include it in the generated /dist/share directory. That should be it. Many thanks to John Hunter for helping me hack through this, and I hope this information will find its way to others so it can save them lots of time. --Matt |
From: Flavio C. C. <fcc...@ci...> - 2004-03-11 18:03:06
|
John I foud it with the "print trick" thank you!!! the main proble was the self.fig which I replaced with the self.canvas and it is now working, Thanks again On Thu, 2004-03-11 at 13:49, Flavio Codeco Coelho wrote: > -----Forwarded Message----- > From: Flavio Codeco Coelho <fcc...@fi...> > To: mat...@li... > <mat...@li...> > Subject: [Matplotlib-users] embedding in wx segfault > Date: Thu, 11 Mar 2004 12:53:40 -0300 > > > > Hi I have a variant of the embedding_in_wx script that worked fine on > my previous version of matplotlib. Now, with version 0.51 it's seg > faulting. I updated the script to reflect the changes in the library > but still... Can anyone see what may be going wrong? > > thanks > > the script is attached |
From: Flavio C. C. <fcc...@ci...> - 2004-03-11 17:08:29
|
-----Forwarded Message----- From: Flavio Codeco Coelho <fcc...@fi...> To: mat...@li... <mat...@li...> Subject: [Matplotlib-users] embedding in wx segfault Date: Thu, 11 Mar 2004 12:53:40 -0300 Hi I have a variant of the embedding_in_wx script that worked fine on my previous version of matplotlib. Now, with version 0.51 it's seg faulting. I updated the script to reflect the changes in the library but still... Can anyone see what may be going wrong? thanks the script is attached |
From: John H. <jdh...@ac...> - 2004-03-11 16:28:13
|
>>>>> "Flavio" == Flavio Codeco Coelho <fcc...@fi...> writes: Flavio> Hi I have a variant of the embedding_in_wx script that Flavio> worked fine on my previous version of matplotlib. Now, Flavio> with version 0.51 it's seg faulting. I updated the script Flavio> to reflect the changes in the library but still... Can Flavio> anyone see what may be going wrong? Please resend as an attachment - your lines are wrapped and hence the code is doubly difficult to debug. A couple of suggestions: wx swallows exceptions. This makes it virtually impossible to debug scripts using wx since you cannot read the stack trace. The problem may be a simple syntax error in your script having nothing to do with matplotlib or the wx backend per se, and you wouldn't see it because of the exception swallowing problem. Workarounds: 1) insert some print statements at the top of each function so you can see when the failure occurs. This is essentially what Jeremy does in backend_wx. Change the _DEBUG level to a low number in backend_wx to get more debugging information. 2) try running pychecker on your script. A lifetime supply of free bugfixes to any wx guru who knows how to fix this problem - Jeremy and I have certainly suffered with it long enough. JDH |
From: Flavio C. C. <fcc...@fi...> - 2004-03-11 16:12:08
|
Hi I have a variant of the embedding_in_wx script that worked fine on my previous version of matplotlib. Now, with version 0.51 it's seg faulting. I updated the script to reflect the changes in the library but still... Can anyone see what may be going wrong? thanks here is my script: ----------------------------------------------------------------------------- # Name: PlotFigure.py # Purpose: Plotting frame that contains the plots generated by Model Buider # # Author: Flavio C. Coelho # # Created: 2004/09/01 # RCS-ID: $Id: PlotFigure.py,v 1.1 2004/01/13 10:51:43 fccoelho Exp $ # Copyright: (c) 2003 # Licence: GPL # Obs: This code was based on Jeremy Donoghue's embedding_in_wx.py included with # matplotlib. #----------------------------------------------------------------------------- #Boa:Frame:PlotFigure import matplotlib matplotlib.use('WX') from matplotlib.backends.backend_wx import Toolbar, FigureCanvasWx, FigureManager from matplotlib.figure import Figure from matplotlib.axes import Subplot import matplotlib.numerix as numpy from RandomArray import * from wxPython.wx import * def create(parent): return PlotFigure(parent) [wxID_PLOTFIGURE] = map(lambda _init_ctrls: wxNewId(), range(1)) class PlotFigure(wxFrame): def _init_ctrls(self, prnt): # generated method, don't edit wxFrame.__init__(self, id=wxID_PLOTFIGURE, name='Output', parent=prnt, pos=wxPoint(480, 335), size=wxSize(640, 480), style=wxDEFAULT_FRAME_STYLE, title='Results') self.SetClientSize(wxSize(1280, 893)) def __init__(self, parent): self._init_ctrls(parent) self.fig = Figure((10,8), 75) self.canvas = FigureCanvasWx(self,-1, self.fig) self.toolbar = Toolbar(self.canvas) self.toolbar.Realize() # On Windows, default frame size behaviour is incorrect # you don't need this under Linux tw, th = self.toolbar.GetSizeTuple() fw, fh = self.canvas.GetSizeTuple() self.toolbar.SetSize(wxSize(fw, th)) # Create a figure manager to manage things self.figmgr = FigureManager(self.canvas, 1, self) # Now put all into a sizer sizer = wxBoxSizer(wxVERTICAL) # This way of adding to sizer prevents resizing #sizer.Add(self.fig, 0, wxLEFT|wxTOP) # This way of adding to sizer allows resizing sizer.Add(self.fig, 1, wxLEFT|wxTOP|wxGROW) # Best to allow the toolbar to resize! sizer.Add(self.toolbar, 0, wxGROW) self.SetSizer(sizer) self.Fit() def plot_data(self, x,y): """ This function will plot the time series as output by odeint. """ # Use this line if using a toolbar a = self.figmgr.add_subplot(111) # Or this one if there is no toolbar #a = Subplot(self.fig, 111) nvar = min(y[0].shape) for i in range(nvar): a.plot (x,y[0][:,i]) #plot (x,timeseries[1]) a.set_xlabel('Time') a.set_ylabel('Y[i]') a.set_title('Time series') #---generating tuple of legends------------------------------------------------- b = range(nvar) leg = tuple(['y['+str(i)+']' for i in b]) #------------------------------------------------------------------------------- a.legend(leg) self.toolbar.update() def plotStats(self,x, ts): """ This function will plot prior an posteriors for the model variables and parameters. """ # Use this line if using a toolbar a = self.figmgr.add_subplot(111) # Or this one if there is no toolbar #a = Subplot(self.fig, 111) a.plot(x,ts[0], 'r-o',x,ts[1],'b-.', x,ts[2],'b-.') def plotDist(data,vname): """ Plots histograms ofthe prior and posterior distributions of the model components meldOut is the output of the Melding.SIR function: (w,qtiltheta,qtilphi,q1est) """ # Use this line if using a toolbar a = self.figmgr.add_subplot(111) # Or this one if there is no toolbar #a = Subplot(self.fig, 111) nb, bins, patches = a.hist(data, normed=1) a.set_title('Prior Distribution') a.set_xtitle(vname) nvp = len(priors) # Get number of variable + parameters in the model) nlik = len (liks) # Get number of likelihood functions for i in range(nvp): nb, bins, patches = a.hist(priors[i], normed=1) if i > 0: a.figure(i+1) a.set_title('Prior Distribution') def GetToolBar(self): # You will need to override GetToolBar if you are using an # unmanaged toolbar in your frame return self.toolbar if __name__ == '__main__': app = wxPySimpleApp() frame = create(None) x = normal(0,1,50) y = normal(0,1,(5,50)) frame.plot_data(x,y) frame.Show() app.MainLoop() |
From: John H. <jdh...@ac...> - 2004-03-10 20:04:24
|
>>>>> "Kuzminski," == Kuzminski, Stefan R <SKu...@fa...> writes: Kuzminski,> Is there a way for the legend to be outside of the Kuzminski,> axis? Perhaps rendered separately. The current implementation of legend takes an axes instance in it's constructor. I just did a read through of that code and it would be trivial to factor it out. The only thing the legend uses that instance for is the background color! You could have a figure legend much in the same way you have figure text. I can probably do it in 20 minutes. When I get 20 minutes, I'll send you a patch.... JDH |