SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S


1
(22)
2
(1)
3
4
(2)
5
6
(1)
7
(14)
8
(3)
9
(4)
10
11
(5)
12
(1)
13
(4)
14
(1)
15
(1)
16
(8)
17
(28)
18
(48)
19
(18)
20
(19)
21
(33)
22
(11)
23
(18)
24
(29)
25
(36)
26
(18)
27
(23)
28
(19)
29
(9)
30
(7)
31
(16)


Showing results of 399

<< < 1 .. 4 5 6 7 8 .. 16 > >> (Page 6 of 16)
From: Ryan M. <rm...@gm...> - 2008年07月25日 00:26:22
Eric Firing wrote:
> Ryan May wrote:
>> Hey,
>>
>> I noticed today, while working on my skewT, that you can't tell the 
>> axis objects to clip their ticklines. If you want to set clipping on 
>> each individual tickline. I saw that the code is there in the 
>> relevant classes, but the lines to set clipping are disabled in 
>> set_clip_path() or _set_artist_props(). My SVN foo is failing me 
>> right now, so I can't find anything to tell me why these changes were 
>> made.
> 
> Does this link work for you? (Sometimes sourceforge is painfully slow, 
> sometimes bits of it seem to simply go away.)
> 
> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/ 
> 
> 
> I find the browser view quite helpful for finding out which changes were 
> made when, and by whom. To find out why, one must often ask or go to 
> the mailing list archive.
Typical. I find it quite useful too, which is why I tried going there 
earlier today. SF had turned off Viewvc due to the server load it was 
causing. Now of course when you go to it, it's on.... :)
>> Anyone have any ideas?
> 
> I don't, but it appears that the set_clip_path method was introduced in 
> 4817 by Mike D., complete with the commented-out lines.
> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/axis.py?annotate=5651 
> 
> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/axis.py?view=diff&r1=4816&r2=4817 
Alright. Mike?
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Eric F. <ef...@ha...> - 2008年07月25日 00:21:33
Ryan May wrote:
> Hey,
> 
> I noticed today, while working on my skewT, that you can't tell the axis 
> objects to clip their ticklines. If you want to set clipping on each 
> individual tickline. I saw that the code is there in the relevant 
> classes, but the lines to set clipping are disabled in set_clip_path() 
> or _set_artist_props(). My SVN foo is failing me right now, so I can't 
> find anything to tell me why these changes were made.
Does this link work for you? (Sometimes sourceforge is painfully slow, 
sometimes bits of it seem to simply go away.)
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/
I find the browser view quite helpful for finding out which changes were 
made when, and by whom. To find out why, one must often ask or go to 
the mailing list archive.
> 
> Anyone have any ideas?
I don't, but it appears that the set_clip_path method was introduced in 
4817 by Mike D., complete with the commented-out lines.
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/axis.py?annotate=5651
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/axis.py?view=diff&r1=4816&r2=4817
> 
> Ryan
> 
From: Ryan M. <rm...@gm...> - 2008年07月25日 00:03:40
Hey,
I noticed today, while working on my skewT, that you can't tell the axis 
objects to clip their ticklines. If you want to set clipping on each 
individual tickline. I saw that the code is there in the relevant 
classes, but the lines to set clipping are disabled in set_clip_path() 
or _set_artist_props(). My SVN foo is failing me right now, so I can't 
find anything to tell me why these changes were made.
Anyone have any ideas?
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Tony Yu <ts...@gm...> - 2008年07月24日 23:12:09
I noticed a couple of really minor typos as shown below:
Index: matplotlib/lib/matplotlib/axis.py
===================================================================
--- matplotlib/lib/matplotlib/axis.py	(revision 5860)
+++ matplotlib/lib/matplotlib/axis.py	(working copy)
@@ -147,7 +147,7 @@
 """
 self._pad = val
- def get_pad(self, val):
+ def get_pad(self):
 'Get the value of the tick label pad in points'
 return self._pad
Index: matplotlib/examples/event_handling/lasso_demo.py
===================================================================
--- matplotlib/examples/event_handling/lasso_demo.py	(revision 5860)
+++ matplotlib/examples/event_handling/lasso_demo.py	(working copy)
@@ -69,7 +69,7 @@
 # acquire a lock on the widget drawing
 self.canvas.widgetlock(self.lasso)
-if 0:
+if __name__ == '__main__':
 data = [Datum(*xy) for xy in rand(100, 2)]
From: John H. <jd...@gm...> - 2008年07月24日 22:59:39
On Thu, Jul 24, 2008 at 5:45 PM, Paul Kienzle <pki...@ni...> wrote:
> Hi,
>
> I added support for scroll wheel events in wx. This includes
> a new attribute event.step since the wx mouse wheel event
> reports larger steps when scrolling faster. I don't see
> how to check step in gtk, so I set step to +1 and -1 for up
> and down.
>
> Can someone with gtk please run the following to make sure
> I didn't break anything:
>
> examples/pylab_examples/image_slices_viewer.py
Works fine for me here...
JDH
From: Paul K. <pki...@ni...> - 2008年07月24日 22:45:35
Hi,
I added support for scroll wheel events in wx. This includes
a new attribute event.step since the wx mouse wheel event
reports larger steps when scrolling faster. I don't see
how to check step in gtk, so I set step to +1 and -1 for up 
and down.
Can someone with gtk please run the following to make sure
I didn't break anything:
 examples/pylab_examples/image_slices_viewer.py
Thanks,
	- Paul
From: Eric F. <ef...@ha...> - 2008年07月24日 22:32:58
Eric Firing wrote:
> John Hunter wrote:
>> On Thu, Jul 24, 2008 at 4:20 PM, Paul Kienzle <pki...@ni...> wrote:
>>
>>> Running, I get a leak of about 5.6 KiB per loop.
>>> I'm using matplotlib svn, macos 10.4, numpy 1.1.0
>> I'm not seeing this w/ PDF or Agg in linux... what backend are you
>> using (the file had set use('PDF') so I assume you are using that.
> 
> Ubuntu hardy, numpy svn, mpl svn, memleak_hawaii3.py with default pdf 
> output:
> 399 12710
> 400 12710
> Average memory consumed per loop: 0.8706k bytes
And with agg backend:
399 12285
400 12285
Average memory consumed per loop: 0.1244k bytes
With ps backend:
399 12206
400 12206
Average memory consumed per loop: 0.1343k bytes
Eric
From: John H. <jd...@gm...> - 2008年07月24日 22:29:34
On Thu, Jul 24, 2008 at 5:16 PM, Paul Kienzle <pki...@ni...> wrote:
> PDF.
OK, correction, I am seeing this too. I cheated and didn't let the
test run to the end. It looked like the memory was flat-lining so I
moved on the Agg test (which is not leaking on my completed tests).
> The examples are a great learning resource. They should not
> include deprecated patterns. I suggest removing it.
Will do -- I'll just rewrite it into the suggested pattern and rename
it accordingly (eg simple_anim_tk.py, etc...)
JDH
From: Paul K. <pki...@ni...> - 2008年07月24日 22:17:13
On Thu, Jul 24, 2008 at 04:28:00PM -0500, John Hunter wrote:
> On Thu, Jul 24, 2008 at 4:20 PM, Paul Kienzle <pki...@ni...> wrote:
> > Running, I get a leak of about 5.6 KiB per loop.
> > I'm using matplotlib svn, macos 10.4, numpy 1.1.0
> 
> I'm not seeing this w/ PDF or Agg in linux... what backend are you
> using (the file had set use('PDF') so I assume you are using that.
PDF.
> Thanks for the fixes. This mode of animation works on tk, but not
> really for the GUI backends, and is discouraged on the cookbook page.
> We probably should update the example to use Tkagg and discourage this
> usage on other GUIs.
The examples are a great learning resource. They should not
include deprecated patterns. I suggest removing it.
	- Paul
From: John H. <jd...@gm...> - 2008年07月24日 22:16:22
On Thu, Jul 24, 2008 at 4:20 PM, Paul Kienzle <pki...@ni...> wrote:
> I also fixed some of the lesser used examples. I'm not going to try to
> fix examples/units. examples/animation/anim.py doesn't update on my
> wxagg backend (wx 2.8.3).
I fixed a few of the units examples that were trivial. The others
were already broken on the trunk so it is not a regression, and I will
hold off on anything more significant pending the units api/design doc
we were discussing earlier. I also added the working examples to the
backend_driver so at least we will not regress further in the
meantime...
JDH
From: Eric F. <ef...@ha...> - 2008年07月24日 21:51:12
John Hunter wrote:
> On Thu, Jul 24, 2008 at 4:20 PM, Paul Kienzle <pki...@ni...> wrote:
> 
>> Testing hawaii on my machine, I saw the following error:
>>
>> Traceback (most recent call last):
>> File "memleak_hawaii3.py", line 13, in <module>
>> rand = np.mlab.rand
>> AttributeError: 'module' object has no attribute 'mlab'
>>
>> I replaced mlab with random and it now works.
> 
> Sorry, I had fixed that locally and forgotten to commit. Committed now.
> 
>> Running, I get a leak of about 5.6 KiB per loop.
>> I'm using matplotlib svn, macos 10.4, numpy 1.1.0
> 
> I'm not seeing this w/ PDF or Agg in linux... what backend are you
> using (the file had set use('PDF') so I assume you are using that.
Ubuntu hardy, numpy svn, mpl svn, memleak_hawaii3.py with default pdf 
output:
399 12710
400 12710
Average memory consumed per loop: 0.8706k bytes
Eric
From: John H. <jd...@gm...> - 2008年07月24日 21:28:04
On Thu, Jul 24, 2008 at 4:20 PM, Paul Kienzle <pki...@ni...> wrote:
> Testing hawaii on my machine, I saw the following error:
>
> Traceback (most recent call last):
> File "memleak_hawaii3.py", line 13, in <module>
> rand = np.mlab.rand
> AttributeError: 'module' object has no attribute 'mlab'
>
> I replaced mlab with random and it now works.
Sorry, I had fixed that locally and forgotten to commit. Committed now.
> Running, I get a leak of about 5.6 KiB per loop.
> I'm using matplotlib svn, macos 10.4, numpy 1.1.0
I'm not seeing this w/ PDF or Agg in linux... what backend are you
using (the file had set use('PDF') so I assume you are using that.
> I also fixed some of the lesser used examples. I'm not going to try to
> fix examples/units. examples/animation/anim.py doesn't update on my
> wxagg backend (wx 2.8.3).
Thanks for the fixes. This mode of animation works on tk, but not
really for the GUI backends, and is discouraged on the cookbook page.
We probably should update the example to use Tkagg and discourage this
usage on other GUIs.
JDH
From: Paul K. <pki...@ni...> - 2008年07月24日 21:20:31
On Thu, Jul 24, 2008 at 02:17:19PM -0500, John Hunter wrote:
> I'd like to try and get 98.3 and 91.5 out tomorrow or Saturday -- if
> the weekday doesn't work for you Charlie we might do a source release
> on Friday or Saturday (for Sandro/debian) and you can get the build
> out over the weekend (if you have time). Obviously a lot of work has
> gone into these releases, and a lot recently, so it is important to
> test on what platforms you can. Currently backend driver and memleak
> hawaii are passing on my platform, and I have managed to at least
> lightly test most of the critical GUI backends (Tk, WX, GTK, Qt and
> QT4) on at least one platform and for some backends a couple.
Testing hawaii on my machine, I saw the following error:
 Traceback (most recent call last):
 File "memleak_hawaii3.py", line 13, in <module>
 rand = np.mlab.rand
 AttributeError: 'module' object has no attribute 'mlab'
I replaced mlab with random and it now works.
Running, I get a leak of about 5.6 KiB per loop.
I'm using matplotlib svn, macos 10.4, numpy 1.1.0
I also fixed some of the lesser used examples. I'm not going to try to
fix examples/units. examples/animation/anim.py doesn't update on my
wxagg backend (wx 2.8.3).
	- Paul
From: Charlie M. <cw...@gm...> - 2008年07月24日 21:16:29
I am out on town for a meeting until Sunday evening. I unfortunately won't
be able to act until Monday at the earliest. Cutting the source release
sounds like a good plan.
- Charlie
On Thu, Jul 24, 2008 at 3:17 PM, John Hunter <jd...@gm...> wrote:
> I'd like to try and get 98.3 and 91.5 out tomorrow or Saturday -- if
> the weekday doesn't work for you Charlie we might do a source release
> on Friday or Saturday (for Sandro/debian) and you can get the build
> out over the weekend (if you have time). Obviously a lot of work has
> gone into these releases, and a lot recently, so it is important to
> test on what platforms you can. Currently backend driver and memleak
> hawaii are passing on my platform, and I have managed to at least
> lightly test most of the critical GUI backends (Tk, WX, GTK, Qt and
> QT4) on at least one platform and for some backends a couple.
>
> The contouring code has had the most recent significant changes, so if
> you have limited time hit that the hardest.
>
> Charlie, let me know what your time frame is....
>
> Sandro, here is a release candidate tarball for you to test with:
> http://matplotlib.sourceforge.net/tmp/matplotlib-0.98.3rc1.tar.gz
>
> Thanks,
> JDH
>
From: Eric F. <ef...@ha...> - 2008年07月24日 20:08:15
John Hunter wrote:
> On Wed, Jul 23, 2008 at 10:05 PM, Ryan May <rm...@gm...> wrote:
> 
>> <grumble> Ok, it fixes the problem if I pass dpi=72 to savefig(). Curiously,
>> passing dpi=72 to Figure() does not have the same effect. So now how do I
> 
> That is because "savefig" has its own dpi, which overrides the figure
> dpi. Tee ideas is that you typically want a different dpi for the UI
> window and for the harcopy
> 
>> fix it? I'm really not sure what's going wrong here. If I had to guess,
>> it's a problem between figure size being in inches while I'm drawing in
>> pixels (still don't know how that works, because there's no way those barbs
>> are 9 pixels long).
> 
> I'm not familiar enough with the windbarb code to know where the "9
> pixel" thing that is bothering you is creeping in, I'm just saying
> that using an identity transform means you are drawing in canvas
> (pixel) space and not accounting for dpi. The Figure instance has a
> "dpi_scale_transform" that is designed to handle dpi scaling, and
> updates itself when the figure dpi is changed so you don't have to
> handle the callbacks. Take a look at this and see if you can
> incorporate it. If you have troubles, Michael or I can advise
> further.
> 
> If you clarify the "9 pixel" problem that is bothering you, I may be
> able to help more sooner...
Part of the problem is the horrible and misleading sizes arg in 
PolyCollections, probably a hangover (yes, a headache) from supporting a 
Matlab-compatible argument in scatter. I can try to straighten this out 
and clarify the situation after the release, not before. I will add an 
alternative kwarg to scatter at the same time, and hope the old usage 
gradually dies out.
Eric
> 
> JDH
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
From: Paul K. <pki...@ni...> - 2008年07月24日 19:26:07
Hello,
Anyone planning to attend post-SciPy2008 code sprints?
Some projects I'm interested in:
 support for units (px, pt/in/cm/mm, em/ex/<font height>, %axis/%figure)
 style sheet editor (needs backend support for forms and menus)
 canvas interface for interactive plotting applications
- Paul
From: John H. <jd...@gm...> - 2008年07月24日 19:17:22
I'd like to try and get 98.3 and 91.5 out tomorrow or Saturday -- if
the weekday doesn't work for you Charlie we might do a source release
on Friday or Saturday (for Sandro/debian) and you can get the build
out over the weekend (if you have time). Obviously a lot of work has
gone into these releases, and a lot recently, so it is important to
test on what platforms you can. Currently backend driver and memleak
hawaii are passing on my platform, and I have managed to at least
lightly test most of the critical GUI backends (Tk, WX, GTK, Qt and
QT4) on at least one platform and for some backends a couple.
The contouring code has had the most recent significant changes, so if
you have limited time hit that the hardest.
Charlie, let me know what your time frame is....
Sandro, here is a release candidate tarball for you to test with:
http://matplotlib.sourceforge.net/tmp/matplotlib-0.98.3rc1.tar.gz
Thanks,
JDH
From: John H. <jd...@gm...> - 2008年07月24日 19:13:24
There are a number of documentation warnings -- at lease some of these
are because doc strings in the api docs are non-compliant. If you've
been working on any of these functions, please take a moment to try
and bring them up to snuff (I suspect one or more of these is mine,
but I'm pasting them all here).
WARNING: /home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/axes.py:docstring
of matplotlib.axes.Axes.acorr:36: (ERROR/3) Unexpected indentation.
WARNING: <autodoc>:0: (ERROR/3) Unexpected indentation.
WARNING: /home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/backend_bases.py:docstring
of matplotlib.backend_bases.FigureCanvasBase.start_event_loop_default:15:
(WARNING/2) Literal block expected; none found.
WARNING: /home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/backend_bases.py:docstring
of matplotlib.backend_bases.FigureCanvasBase.stop_event_loop_default:8:
(WARNING/2) Literal block expected; none found.
WARNING: /home/jdhunter/mpl/doc/api/cbook_api.rst:9: (WARNING/2) error
while formatting signature for matplotlib.cbook.Xlator: arg is not a
Python function
WARNING: /home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/cbook.py:docstring
of matplotlib.cbook.distances_along_curve:6: (WARNING/2) Literal block
expected; none found.
WARNING: /home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/cbook.py:docstring
of matplotlib.cbook.is_closed_polygon:8: (WARNING/2) Literal block
expected; none found.
WARNING: /home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/cbook.py:docstring
of matplotlib.cbook.less_simple_linear_interpolation:14: (WARNING/2)
Literal block expected; none found.
WARNING: /home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/cbook.py:docstring
of matplotlib.cbook.path_length:6: (WARNING/2) Literal block expected;
none found.
WARNING: /home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/cbook.py:docstring
of matplotlib.cbook.vector_lengths:8: (WARNING/2) Literal block
expected; none found.
WARNING: /home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/figure.py:docstring
of matplotlib.figure.Figure.text:37: (WARNING/2) Inline strong
start-string without end-string.
WARNING: /home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/pyplot.py:docstring
of matplotlib.pyplot.acorr:55: (ERROR/3) Unexpected indentation.
WARNING: /home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/pyplot.py:docstring
of matplotlib.pyplot.annotate:15: (ERROR/3) Unexpected indentation.
WARNING: /home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/pyplot.py:docstring
of matplotlib.pyplot.gca:2: (WARNING/2) Inline strong start-string
without end-string.
From: Paul K. <pki...@ni...> - 2008年07月24日 15:56:02
On Thu, Jul 24, 2008 at 05:14:42PM +0200, David Kaplan wrote:
> Hi,
> 
> No, it doesn't appear to work with or without my changes. Also, it
> looks to me like the following code is now misplaced in backend_wx.py:
> 
> # Event binding code changed after version 2.5
> if wx.VERSION_STRING >= '2.5':
> def bind(actor,event,action,**kw):
> actor.Bind(event,action,**kw)
> else:
> def bind(actor,event,action,id=None):
> if id is not None:
> event(actor, id, action)
> else:
> event(actor,action)
> 
> It now appears after some functions not in the class. Is this OK?
This code is not part of any class. Anyway, I moved it to the top
of the file.
> Also, I noticed that this defines bind, while elsewhere in the class
> self.Bind is used. Is this correct? If so, should these other
> references perhaps take advantage of your abstraction?
I've committed a change so that all functions now use 
 bind(self, wx.EVT, callback, id=id)
rather than
 if wx.VERSION_STRING >= '2.5':
 self.Bind(wx.EVT,callback,id=id)
 else:
 wx.EVT(self, id, callback)
I'm not set up to test against wx < 2.5, though given its age
and the small user base of matplotlib wx, I'm not sure that
it is relevant anymore.
- Paul
From: David K. <Dav...@ir...> - 2008年07月24日 15:14:52
Hi,
No, it doesn't appear to work with or without my changes. Also, it
looks to me like the following code is now misplaced in backend_wx.py:
# Event binding code changed after version 2.5
if wx.VERSION_STRING >= '2.5':
 def bind(actor,event,action,**kw):
 actor.Bind(event,action,**kw)
else:
 def bind(actor,event,action,id=None):
 if id is not None:
 event(actor, id, action)
 else:
 event(actor,action)
It now appears after some functions not in the class. Is this OK?
Also, I noticed that this defines bind, while elsewhere in the class
self.Bind is used. Is this correct? If so, should these other
references perhaps take advantage of your abstraction?
Cheers,
David
On Thu, 2008年07月24日 at 11:02 -0400, Paul Kienzle wrote:
> On Thu, Jul 24, 2008 at 12:12:21PM +0200, David Kaplan wrote:
> > 4) In WX, I used the code submitted by Paul, but was unable to check it
> > because when I tried to use the WX backend, I got an error about no
> > GraphicsContext (below). This looks bad. I am using wxPython: 2.6.3.2.
> 
> Does wx work for you without the change? I suspect not...
> 
> I posted a fix to make the wx backend work for me with 
> examples/pylab_examples/ginput_demo.py and wx 2.8.3.
> 
> One issue I didn't address properly is what happens when the user 
> exits by closing the window. Currently it raises an error when
> ginput requests draw.
> 
> 	- Paul
-- 
**********************************
David M. Kaplan
Charge de Recherche 1
Institut de Recherche pour le Developpement
Centre de Recherche Halieutique Mediterraneenne et Tropicale
av. Jean Monnet
B.P. 171
34203 Sete cedex
France
Phone: +33 (0)4 99 57 32 27
Fax: +33 (0)4 99 57 32 95
http://www.ur097.ird.fr/team/dkaplan/index.html
**********************************
From: Paul K. <pki...@ni...> - 2008年07月24日 15:03:55
On Thu, Jul 24, 2008 at 12:12:21PM +0200, David Kaplan wrote:
> 4) In WX, I used the code submitted by Paul, but was unable to check it
> because when I tried to use the WX backend, I got an error about no
> GraphicsContext (below). This looks bad. I am using wxPython: 2.6.3.2.
Does wx work for you without the change? I suspect not...
I posted a fix to make the wx backend work for me with 
examples/pylab_examples/ginput_demo.py and wx 2.8.3.
One issue I didn't address properly is what happens when the user 
exits by closing the window. Currently it raises an error when
ginput requests draw.
	- Paul
From: John H. <jd...@gm...> - 2008年07月24日 14:45:36
On Thu, Jul 24, 2008 at 9:32 AM, David Kaplan <Dav...@ir...> wrote:
>> * avoid the ternary operator, as in
>>
>> # Figure out label rotation.
>> rotation,nlc = cs.calc_label_rot_and_inline(
>> slc, imin, lw, lc if self.inline else [],
>> self.inline_spacing )
>>
>> since this requires python2.5. I replaced this, and a similar
>> construct in contour.py, so please make sure I did the right thing
>>
>
> The reason I used this was that I saw the following line in contour.py
> (line 325):
>
> lc = [tuple(l) for l in linecontour]
>
> Doesn't this also require 2.5 or is the if different than the for?
> Should this also be changed?
No, this (a list comprehension) is fine. The problem is the ternary
operator " lc if self.inline else []"
which is not supported in python 2.4. I believe all the python
2.5isms have been removed.
>> def func(x=None):
>> if x is None: x = []
>>
>> I have fixed this in contour.py
>>
>
> I don't really understand how this can be a problem, but it probably
> isn't that important unless you feel like enlightening me.
See for example
http://www.velocityreviews.com/forums/t350126-default-argument-to-init.html
From: David K. <Dav...@ir...> - 2008年07月24日 14:32:33
Hi,
I made the suggested fixes. Comments below:
On Thu, 2008年07月24日 at 08:38 -0500, John Hunter wrote:
> On Thu, Jul 24, 2008 at 7:31 AM, David Kaplan <Dav...@ir...> wrote:
> 
> > I committed the changes to clabel (r5830).
> 
> Hey David -- thanks for these fixes. I noticed a couple of things I
> want to comment on
> 
> * avoid the ternary operator, as in
> 
> # Figure out label rotation.
> rotation,nlc = cs.calc_label_rot_and_inline(
> slc, imin, lw, lc if self.inline else [],
> self.inline_spacing )
> 
> since this requires python2.5. I replaced this, and a similar
> construct in contour.py, so please make sure I did the right thing
> 
The reason I used this was that I saw the following line in contour.py
(line 325):
lc = [tuple(l) for l in linecontour]
Doesn't this also require 2.5 or is the if different than the for?
Should this also be changed?
> * avoid needless *args, **kwargs usage. We do this all the time in
> pylab and to a lesser extent in axes.py because we are passing the
> function call on to another layer. In that case, at least document
> the proper signature as the first line in the docstring. But unless
> we need it, avoid it, eg in
I removed all this arbitrary argument stuff. I was thinking that if we
ever invented a better mouse trap, this would let us automatically pass
that on to GUI's we haven't written specific functions for yet. But we
are unlikely to invent a better mouse trap.
> 
> * Using an empty list in a python kwarg as the default is a gotcha, as in
> 
> def calc_label_rot_and_inline( self, slc, ind, lw, lc=[], spacing=5 ):
> 
> The reason is that if the function mutates the list, this often leads
> to unintended consequences as the list is module level and thus shared
> between instances and method calls. The standard idiom for mutable
> (lists and dicts) keyword args s
> 
> def func(x=None):
> if x is None: x = []
> 
> I have fixed this in contour.py
> 
I don't really understand how this can be a problem, but it probably
isn't that important unless you feel like enlightening me.
Cheers,
David
> JDH
-- 
**********************************
David M. Kaplan
Charge de Recherche 1
Institut de Recherche pour le Developpement
Centre de Recherche Halieutique Mediterraneenne et Tropicale
av. Jean Monnet
B.P. 171
34203 Sete cedex
France
Phone: +33 (0)4 99 57 32 27
Fax: +33 (0)4 99 57 32 95
http://www.ur097.ird.fr/team/dkaplan/index.html
**********************************
From: John H. <jd...@gm...> - 2008年07月24日 13:52:04
On Wed, Jul 23, 2008 at 10:05 PM, Ryan May <rm...@gm...> wrote:
> <grumble> Ok, it fixes the problem if I pass dpi=72 to savefig(). Curiously,
> passing dpi=72 to Figure() does not have the same effect. So now how do I
That is because "savefig" has its own dpi, which overrides the figure
dpi. Tee ideas is that you typically want a different dpi for the UI
window and for the harcopy
> fix it? I'm really not sure what's going wrong here. If I had to guess,
> it's a problem between figure size being in inches while I'm drawing in
> pixels (still don't know how that works, because there's no way those barbs
> are 9 pixels long).
I'm not familiar enough with the windbarb code to know where the "9
pixel" thing that is bothering you is creeping in, I'm just saying
that using an identity transform means you are drawing in canvas
(pixel) space and not accounting for dpi. The Figure instance has a
"dpi_scale_transform" that is designed to handle dpi scaling, and
updates itself when the figure dpi is changed so you don't have to
handle the callbacks. Take a look at this and see if you can
incorporate it. If you have troubles, Michael or I can advise
further.
If you clarify the "9 pixel" problem that is bothering you, I may be
able to help more sooner...
JDH
From: John H. <jd...@gm...> - 2008年07月24日 13:38:32
On Thu, Jul 24, 2008 at 7:31 AM, David Kaplan <Dav...@ir...> wrote:
> I committed the changes to clabel (r5830).
Hey David -- thanks for these fixes. I noticed a couple of things I
want to comment on
* avoid the ternary operator, as in
 # Figure out label rotation.
 rotation,nlc = cs.calc_label_rot_and_inline(
 slc, imin, lw, lc if self.inline else [],
 self.inline_spacing )
since this requires python2.5. I replaced this, and a similar
construct in contour.py, so please make sure I did the right thing
* avoid needless *args, **kwargs usage. We do this all the time in
pylab and to a lesser extent in axes.py because we are passing the
function call on to another layer. In that case, at least document
the proper signature as the first line in the docstring. But unless
we need it, avoid it, eg in
 def start_event_loop(self,*args,**kwargs):
 """
 Start an event loop. This is used to start a blocking event
 loop so that interactive f
If you want to give the user who is using a known UI that supports
extra args, do it like
 def func(self, timeout, **kwargs):
and pass the kwargs through, but at lease require the known args and
kwargs in the main signature.
* Using an empty list in a python kwarg as the default is a gotcha, as in
 def calc_label_rot_and_inline( self, slc, ind, lw, lc=[], spacing=5 ):
The reason is that if the function mutates the list, this often leads
to unintended consequences as the list is module level and thus shared
between instances and method calls. The standard idiom for mutable
(lists and dicts) keyword args s
 def func(x=None):
 if x is None: x = []
I have fixed this in contour.py
JDH

Showing results of 399

<< < 1 .. 4 5 6 7 8 .. 16 > >> (Page 6 of 16)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /