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
(14) |
2
(31) |
3
(20) |
4
(4) |
|
5
(2) |
6
(10) |
7
(25) |
8
(13) |
9
(3) |
10
(5) |
11
(2) |
|
12
(1) |
13
(19) |
14
(16) |
15
(18) |
16
(7) |
17
(17) |
18
|
|
19
(2) |
20
(7) |
21
(12) |
22
(14) |
23
(8) |
24
(6) |
25
(3) |
|
26
|
27
(21) |
28
(8) |
29
(5) |
30
(6) |
|
|
|
From: Fernando P. <Fer...@co...> - 2005-06-07 20:34:27
|
Hi all, Small problem. After using pylab to run some code, having enabled the beautiful new latex support, when I quit pylab I'm getting a bunch of junk files like: -rw-r--r-- 1 fperez 8 Jun 7 14:32 e85b79abfd76b7c13b1334d8d8c194a5.aux left in the current directory. Some cleanup code is not being executed, any ideas? Cheers, f |
|
From: Nicolas G. <nic...@ne...> - 2005-06-07 20:09:56
|
On Tuesday 07 June 2005 17:38, Nicolas Girard wrote: > I must confess I'd also find it useful if one could tell me how to change > only but the x axis range... Okay, for this question I know the answer: the xlim() function ! Nicolas |
|
From: Charles M. <cm...@in...> - 2005-06-07 20:02:09
|
I am posting a new 0.81 build with basemap-0.5 right now for Panther. The 0.80 misplaced the datafiles, which explains the .matplotlibrc error you got, Christian. I will make a Tiger build when I get home to my laptop tonight. The current tiger build should work fine though, only the panther one had issues. - Charlie Christian Meesters wrote: > Hi Frank, > > You might want to check this link: http://sda.iu.edu/projects.html It > provides you with binary installers. > > The link was posted in the matplotlib mailing list. I suggested to > announce it for the Pythonmac-SIG as well (hereby done *g*), but got no > reply so far. > > Cheers, > Christian > > > On 7 Jun 2005, at 14:27, fgh...@bl... wrote: > > >>Hi all, >> >>What's the recommended way to install matplotlib on the 2.4.1 framework >>build? >> >>I've tried installing the py2.3-macosx.3 version, but that didn't >>seem to work. >> >>Do I need to use fink (and leave the nice "official unoffical" >>environment behind)? Compile from source? Dependency issues? >> >>Any hints >>for a pythonmac (and Tiger) newbie? >> >>TIA! >> >> Frank Horowitz >>_______________________________________________ >>Pythonmac-SIG maillist - Pyt...@py... >>http://mail.python.org/mailman/listinfo/pythonmac-sig >> > > > _______________________________________________ > Pythonmac-SIG maillist - Pyt...@py... > http://mail.python.org/mailman/listinfo/pythonmac-sig |
|
From: John H. <jdh...@ac...> - 2005-06-07 19:27:16
|
>>>>> "Jeffrey" == Jeffrey O'Neill <jc...@co...> writes:
Jeffrey> I just started using matplotlib and I am very impressed.
Jeffrey> Thanks to the developers!
The easiest way to fix this is simply change the size of your axes,
eg,
http://matplotlib.sourceforge.net/faq.html#TEXTOVERLAP
The reason you are having trouble setting the y value of the xlabel is
that it is dynamically repositioned at draw time to make sure it is
not overlapping to tick labels. The Axis.LABELPAD parameter
determines the spacing between ticklabels and the xlabel
ax.xaxis.LABELPAD = 10 # 5 is default
This should be exposed as an rc param, but is not currently.
JDH
|
|
From: Jeffrey O'N. <jc...@co...> - 2005-06-07 19:08:09
|
Hello,
When I output my figures to postscript format the xlabel and ylabel are
a bit clipped. I'm trying to tweak the position of the xlabel using:
f=figure(0, figsize=(3,3))
[...]
contour(r, r, x, [0.5, 0.6, 0.7, 0.8, 0.9], colors='k')
xlabel("magnitude", fontsize="10")
ylabel("differential", fontsize="10")
f.get_axes()[0].get_xaxis().get_label().set_position((0.5,5)) # I tried
y's of 0.1 to 5.0
But the xlabel doesn't move one bit. Any suggestions on how I move the
xlable or otherwise fix the clipping?
I just started using matplotlib and I am very impressed. Thanks to the
developers!
best,
Jeff O'Neill
|
|
From: John H. <jdh...@ac...> - 2005-06-07 19:00:33
|
>>>>> "Gary" == Gary <pa...@in...> writes:
Gary> I'm still at python 2.3.x. (I don't plan to upgrade until
Gary> some kind soul makes a scipy WinXP installer for python 2.4)
Gary> The mpl website still says python 2.2+ is required. Just
Gary> checking: is that still correct? Will mpl work with python
Gary> 2.3.x ??
Yes, and there is a windows installer for 2.3 on the mpl website.
Gary> ... can't wait to try the TeX support!
TeX support is untested on win32. Do you have tex installed on your
XP box? You will also need dvipng for agg (is there a dvipng port for
win32?). My guess is you will run into some troubles, which can
probably be fixed. If you are only interested in postscript, and have
tex, dvips and ghostscript, there is a fighting chance it will work.
JDH
|
|
From: John H. <jdh...@ac...> - 2005-06-07 18:57:49
|
>>>>> "Nicolas" == Nicolas Girard <nic...@ne...> writes:
Nicolas> By the way, when text.usetex is set to True, could one
Nicolas> imagine to be able to use string arguments to the mpl
Nicolas> text routines whithout that leading 'r' ?
The need to use raw strings is a python requirement and not a
matplotlib requirement
>>> s = 'this is \nu'
>>> print s
this is
u
>>>
backslash has a special meaning to python, and the only way around
this is to either hack your own python shell (eg modify ipython),
quote the slash (eg use \\) or use a raw string. Of course, if your
TeX expression has no special characters (eg no backslashes) then you
will not need the raw string quote.
JDH
|
|
From: Nicolas G. <nic...@ne...> - 2005-06-07 17:09:20
|
On Tuesday 07 June 2005 18:57, John Hunter wrote:
> Did you remember to quote the string
>
> from pylab import plot, title, show, rc
> rc('text', usetex=True)
> title(r'Acc\'ent')
> show()
>
I'm dumb... I took care of writing r"..." to test maths, but forgot the
leading 'r' to test the accentuated characters... sorry, everything works
like a charm !
By the way, when text.usetex is set to True, could one imagine to be able to
use string arguments to the mpl text routines whithout that leading 'r' ?
> I don't believe unicode works with usetex at this time -- file a
> support request on the sf site with an example script that you believe
> should work (eg the string works in TeX) but does does not work in
> mpl.
Well, I think I won't need them, accentuated characters are enough for me,
thanks !
nicolas
|
|
From: Gary <pa...@in...> - 2005-06-07 17:02:10
|
John Hunter wrote: >Win32 Warning: This is the first release I've done since my windows > > I'm still at python 2.3.x. (I don't plan to upgrade until some kind soul makes a scipy WinXP installer for python 2.4) The mpl website still says python 2.2+ is required. Just checking: is that still correct? Will mpl work with python 2.3.x ?? thanks, -g ... can't wait to try the TeX support! |
|
From: John H. <jdh...@ac...> - 2005-06-07 16:57:55
|
>>>>> "Nicolas" =3D=3D Nicolas Girard <nic...@ne...> writes:
Nicolas> On Tuesday 07 June 2005 18:22, John Hunter wrote:
>> TeX support : Now you can (optionally) use TeX to handle *all*
>> of the =A0 text elements in your figure with the rc param
>> text.usetex (*Agg and =A0 PS only).
Nicolas> Now, that's *just* great ! A big thank you for adding
Nicolas> this feature !
Nicolas> I just seem to have problems whith accentuated
Nicolas> characters: neither "=E9", nor "\'e" work for me... any
Nicolas> ideas ?
Did you remember to quote the string
from pylab import plot, title, show, rc
rc('text', usetex=3DTrue)
title(r'Acc\'ent')
show()
I don't believe unicode works with usetex at this time -- file a
support request on the sf site with an example script that you believe
should work (eg the string works in TeX) but does does not work in
mpl.
=20
JDH
|
|
From: Ted D. <ted...@jp...> - 2005-06-07 16:53:29
|
Darren, You are correct - the way the Qt window is being draw causes the toolbar to overlay the plot so you end up w/ a reduced size plot. The real problem is that we used a QtToolbar class to implement the toolbar. The QtToolbar supports dragging, collapsing, and unhooking of the toolbar just like MS Word and other applications. This makes it very difficult to control where the toolbar ends up and control the final sizes of the widgets. I think the simplest fix is change the toolbar to a collection of buttons and explicitly control the layout for them. It shouldn't be very difficult but I'm going on vacation tomorrow so we might not get to it until next week. While we're doing this we'll also move the numeric x,y readout into the toolbar (it's currently below the toolbar) to save space and follow the pattern used in the Tk and Gtk backends. Ted > > I have a question about figure size in pylab, which presently includes the > toolbar. I think figure(figsize=(3,3)) should create a 3x3in plot > window, and > append the toolbar below it. The effect is more noticeable on the QtAgg and > WXAgg backends, where the coordinates are reported below the toolbar. Is > this > a bug or a feature? > > Darren > |
|
From: Nicolas G. <nic...@ne...> - 2005-06-07 16:51:54
|
On Tuesday 07 June 2005 18:22, John Hunter wrote: > TeX support : Now you can (optionally) use TeX to handle *all* of the > =A0 text elements in your figure with the rc param text.usetex (*Agg and > =A0 PS only). Now, that's *just* great ! A big thank you for adding this feature ! I just seem to have problems whith accentuated characters: neither "=E9", n= or=20 "\'e" work for me... any ideas ? cheers nicolas |
|
From: Jeff P. <jef...@se...> - 2005-06-07 16:36:40
|
Hello, I attached my application. I'm trying to get a plot to show up on a wx.Panel that is inside a splitter window. The plot appears at a strange location. To activate the plot I press the tool bar button. Any help would be much appreciated. Thanks! Jeff |
|
From: John H. <jdh...@ac...> - 2005-06-07 16:36:23
|
>>>>> "Nicolas" =3D=3D Nicolas Girard <nic...@ne...> writes:
Nicolas> On Tuesday 07 June 2005 18:22, John Hunter wrote:
>> Byte images: Much faster imaeg loading for MxNx4 or MxNx3 UInt8
>> =A0 images, which bypasses the memory and CPU intensive
>> integer/floating =A0 point conversions. =A0Nicolas Girard
Nicolas> Well... I'm afraid I've been confused with another guy...
Yes :-) That would be Nicholas Young...
Thanks for the heads up.
JDH
|
|
From: Nicolas G. <nic...@ne...> - 2005-06-07 16:31:39
|
On Tuesday 07 June 2005 18:22, John Hunter wrote: > Byte images: Much faster imaeg loading for MxNx4 or MxNx3 UInt8 > =A0 images, which bypasses the memory and CPU intensive integer/floating > =A0 point conversions. =A0Nicolas Girard Well... I'm afraid I've been confused with another guy... Nicolas |
|
From: John H. <jdh...@ac...> - 2005-06-07 16:22:51
|
Win32 Warning: This is the first release I've done since my windows build syste dies and I had to reinstall a bunch of tools and some version numbers in my GTK build environment changed (eg my GTK setup). Let me know if you encounter any problems. As always, try removing site-packages/matplotlib and reinstalling before reporting any problems TeX support : Now you can (optionally) use TeX to handle *all* of the text elements in your figure with the rc param text.usetex (*Agg and PS only). PS support requires tex, dvips and Ghostscript 8.51 (older versions do not work properly -- test your version with 'gs --version'). Agg support requires tex and dvipng. A directory ~/.tex.cache is created where support files are cached for later reuse. We opted to ues TeX rather than LaTeX because it is faster and can do all the things we thought useful for figure text snippets. See http://matplotlib.sf.net/screenshots.html#tex_demo and http://matplotlib.sf.net/matplotlib.texmanager.html. There are several new rc params for configuring tex/latex support # use tex/latex for all text handling text.usetex : False # tex is faster, but latex is required to use special font # packages. See font.latex.package text.tex.engine : latex # This must be an available LaTeX font package, # like 'times' or 'pslatex' ; only applies if text.usetex # is true font.latex.package : type1cm Special thanks to Darren Dale for lots of hair-pulling work customizing, enhancing and debugging the ps backend for LaTeX support. Masked arrays: Support for masked arrays in line plots, pcolor and contours. There are some problems with filled contours and masked arrays. Thanks Eric Firing and Jeffrey Whitaker. Contour levels arg changes: see http://matplotlib.sf.net/API_CHANGES for details Byte images: Much faster imaeg loading for MxNx4 or MxNx3 UInt8 images, which bypasses the memory and CPU intensive integer/floating point conversions. Nicolas Girard New image resize options interpolation options. New values for the interp kwarg are 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos', 'blackman' See help(imshow) for details, particularly the interpolation, filternorm and filterrad kwargs. Text and dashes - Daishi Harada contributed a patch for connecting text to points with lines. See examples/dashpointlabel.py and examples/dashtick.py Fast markers on win32: The marker cache optimization is finally available for win32, after an agg bug was found and fixed (thanks Maxim!). Line marker plots should be considerably faster now on win32. set deprecated: use setp instead; a simple, mostly braindead, conversion script is provided below Qt in ipython/pylab: You can now use qt in ipython pylab mode. Thanks Fernando Perez and the Orsay team! Agg wrapper proper: Started work on a proper agg wrapper to expose more general agg functionality in mpl. See examples/agg_test.py. Lots of wrapping remains to be done. New scalar formatter: Darren Dale did a lot of work to make scalar formatting smarter in pathalogical cases. See examples/newscalarformatter_demo.py Small features: linewidth and faceted kwarg to scatter to control edgewidth and color, autolegending now inspects line segments in addition to vertices, upgraded to agg23, new example showing how to use line collections examples/line_collection.py, fixed antialiased property setting in agg, added a postscript papersize rc option, added an example showing how to embed mpl in a qt app examples/embedding_in_qt.py, arrow keys now exposed in mpl's GUI neutral event handling, added "among" kwarg to axes picker function to limit picks, added autoscale_on property to Axes to control whether or not autoscaling is done. Bug fixes: fixed a contour masked array bug, contour memory leak # Here is a script to recursively convert set and get to setp and # getp. Please backup entire directory recursively before # running this script from matplotlib.cbook import listFiles for fname in listFiles('.', '*.py'): lines = [] cnt = 0 for line in file(fname): if line.lstrip().startswith('set('): line = line.replace('set(', 'setp(') cnt +=1 if line.lstrip().startswith('get('): line = line.replace('get(', 'getp(') cnt +=1 lines.append(line) file(fname, 'w').writelines(lines) print '%s\t: %d replacements'%(fname,cnt) |
|
From: Nicolas G. <nic...@ne...> - 2005-06-07 15:39:07
|
Hi all,
I'd like to write a function which, for a given data, plots it in 3 subplots
the following way:
+-------+ +-------+ +-------+
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| A | | B | | C |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
+-------+ +-------+ +-------+
0 1 0 0.1 0.9 1
where A,B and C should be the same figure ; only the x axis range should
differ.
As generating A is not straightforward, it would be useful in this case to be
able to duplicate A as B and A as C, then to change B and C's x axis.
Have you any idea on how to do this ?
I must confess I'd also find it useful if one could tell me how to change only
but the x axis range... I know the axis() function but it seems you must
provide both x & y ranges to this function so that's not what I need ; I also
tried
gcf().axes[0].set_xlim((0,0.1))
but whithout success...
Thanks in advance,
cheers,
nicolas
|
|
From: John H. <jdh...@ac...> - 2005-06-06 18:22:20
|
>>>>> "Nikolai" == Nikolai Hlubek <nik...@ma...> writes:
Nikolai> Hi everyone Since there is an upcoming new version I have
Nikolai> a little bug report, that might be worth having a look
Nikolai> at:
>>>> ipython -pylab plot((1e-30,1e-30))
Nikolai> No problem there. Now:
>>>> ipython -pylab subplot(1,1,1) plot((1e-30,1e-30))
Nikolai> Here I get an error message.
Nikolai> The same routine with semilogx/y as plot command gives no
Nikolai> error.
Could you please file a bug report on the sf site.
Thanks,
JDH
|
|
From: Nikolai H. <nik...@ma...> - 2005-06-06 17:57:53
|
Hi everyone Since there is an upcoming new version I have a little bug report, that might be worth having a look at: >>> ipython -pylab >>> plot((1e-30,1e-30)) No problem there. Now: >>> ipython -pylab >>> subplot(1,1,1) >>> plot((1e-30,1e-30)) Here I get an error message. The same routine with semilogx/y as plot command gives no error. Best regards, Nikolai -- "1984" is not a howto! |
|
From: John H. <jdh...@ac...> - 2005-06-06 17:20:14
|
>>>>> "Arnd" == Arnd Baecker <arn...@we...> writes:
Arnd> So the question is, how can I turn off auto-scaling and just
Arnd> leave the plot window to the specified rectangle
Arnd> [-1.1,1.1]^2 ?
No way in the current release. But it is a good idea so I just added
the "autoscale_on" property to the Axes, which you can use like
ax.set_autoscale_on(False)
I'm hoping to get a release out tomorrow, but the changes are in CVS.
Checking in lib/matplotlib/axes.py;
/cvsroot/matplotlib/matplotlib/lib/matplotlib/axes.py,v <-- axes.py
new revision: 1.109; previous revision: 1.108
Thanks for the suggestion,
JDH
|
|
From: Arnd B. <arn...@we...> - 2005-06-06 17:14:15
|
Hi,
What is the best way to change the joinstyle of lines?
I found in the users guide for 0.80 (April 2005)
that there is something like
gc.set_joinstyle('miter')
but I don't know how to get to the gc from the pylab interface.
Any pointers are very much appreciated!
Best,
Arnd
P.S.: John, it seems that the matplotlib user's guide
linked to on the sourceforge front page,
http://matplotlib.sourceforge.net/users_guide_0.80.pdf
is not the latest one (it is dated Dec 30 2004).
|
|
From: Arnd B. <arn...@we...> - 2005-06-06 17:08:48
|
Hi, let me try another one: #----------------------- from pylab import * fig = figure(figsize=(6,6)) ax = fig.add_axes([0.1, 0.1, 0.8, 0.8]) phi=arange(0.0,2.0*pi+0.05,0.1) x=cos(phi) y=sin(phi) plot(x,y,linewidth=2) xlim(-1.1,1.1 ) ylim(-1.1,1.1 ) # Question: how can I turn-off autoscaling, # so that the circle stays a circle # and the following plot only adds a part # of an ellipse? plot(2*x,0.5*y,linewidth=5) show() #------------------------ So the question is, how can I turn off auto-scaling and just leave the plot window to the specified rectangle [-1.1,1.1]^2 ? Many thanks, Arnd |
|
From: Charles M. <cm...@in...> - 2005-06-06 16:58:04
|
Hi all, We have updated the OSX binaries which include all dependencies in a single installer (i.e. libpng, freetype, numarray, Numeric, ...). There are 10.3/panther and 10.4/tiger binaries which include mpl-0.80 and basemap-0.4.2. The panther binary includes wxpython and the tiger binary uses the system included wxpython. Please feel free to contact me if you experience any problems. "Tools, Applications" Section: http://sda.iu.edu/projects.html - Charlie |
|
From: Arnd B. <arn...@we...> - 2005-06-06 14:37:34
|
On Mon, 6 Jun 2005, Ken McIvor wrote: > On Jun 6, 2005, at 9:10 AM, Arnd Baecker wrote: > > However, the additional lines, plotted inside > > the on_press event handler, are not shown > > (only after clicking on the "home" button, or zoom, they > > appear). This is with matplotlib 0.80, debian, GTKAgg frontend. > > You either need to turn on interactive plotting (`ion()', I think), or This one does not work for me. > add a call to `draw()' to redraw the plot: Yes - this does the job. > def on_press(event): > """Draw on button press events.""" > > print "Event:",event.x,event.y,event.xdata,event.ydata,event.inaxes > if event.inaxes==ax2: > ax1.plot(phi, event.ydata*x, 'r--') > draw() > > I hope this helps. It does indeed. Now I am only wondering, why draw() did not work an hour ago or so, when I played around with the various options? (Obviously, this is a less technical, but more difficult question ;-). Many thanks, also to you Fernando, Arnd |
|
From: <Fer...@co...> - 2005-06-06 14:24:55
|
Quoting Arnd Baecker <arn...@we...>:
> I would like to react on mouse-clicks
> by adding lines to a plot
> (see the example at the end of this mail).
>
> However, the additional lines, plotted inside
> the on_press event handler, are not shown
> (only after clicking on the "home" button, or zoom, they
> appear). This is with matplotlib 0.80, debian, GTKAgg frontend.
>
> Is there a simple trick to make them visible?
I think so:
> if event.inaxes==ax2:
> ax1.plot(phi, event.ydata*x, 'r--')
> # QUESTION: How can I force to show this line in ax1?
# ANSWER
draw()
>
> connect('button_press_event', on_press)
At least on my simple tests, that does it.
Best,
f
|