SourceForge logo
SourceForge logo
Menu

matplotlib-devel

From: Charlie M. <cw...@gm...> - 2005年11月08日 19:34:44
First of all I just committed a generalized SpanSelector widget that
allows for a horizontal or vertical selection.
I am running into a problem (and HorizontalSpanSelector suffered from
the same problem) that the rect is drawn incorrectly if I adjust the
sublot params. Any of the MPL transforms experts know what I need to
do?
Thanks,
 Charlie
From: John H. <jdh...@ac...> - 2005年11月09日 21:35:02
>>>>> "Charlie" == Charlie Moad <cw...@gm...> writes:
 Charlie> First of all I just committed a generalized SpanSelector
 Charlie> widget that allows for a horizontal or vertical
 Charlie> selection.
 Charlie> I am running into a problem (and HorizontalSpanSelector
 Charlie> suffered from the same problem) that the rect is drawn
 Charlie> incorrectly if I adjust the sublot params. Any of the
 Charlie> MPL transforms experts know what I need to do?
I'm having trouble replicating your problem. I launch span_selector,
draw a rect, and it looks ok. Then I click on subplot params button,
change the limits, and repeat, and it still looks right to me, both on
the drawn rectangle and the limits printed by the callback.
Tested on gtkagg with cvs head.
JDH
From: Charlie M. <cw...@gm...> - 2005年11月10日 14:58:59
I guess I should have mentioned TkAgg CVS. I didn't think the problem
would be specific to a backend, so I didn't try any others. Also,
when I have more than one subplot, nothing is drawn period.
- Charlie
On 11/9/05, John Hunter <jdh...@ac...> wrote:
> >>>>> "Charlie" =3D=3D Charlie Moad <cw...@gm...> writes:
>
> Charlie> First of all I just committed a generalized SpanSelector
> Charlie> widget that allows for a horizontal or vertical
> Charlie> selection.
>
> Charlie> I am running into a problem (and HorizontalSpanSelector
> Charlie> suffered from the same problem) that the rect is drawn
> Charlie> incorrectly if I adjust the sublot params. Any of the
> Charlie> MPL transforms experts know what I need to do?
>
> I'm having trouble replicating your problem. I launch span_selector,
> draw a rect, and it looks ok. Then I click on subplot params button,
> change the limits, and repeat, and it still looks right to me, both on
> the drawn rectangle and the limits printed by the callback.
>
> Tested on gtkagg with cvs head.
>
> JDH
>
From: John H. <jdh...@ac...> - 2005年11月09日 22:00:39
>>>>> "Charlie" == Charlie Moad <cw...@gm...> writes:
 Charlie> I guess I should have mentioned TkAgg CVS. I didn't
 Charlie> think the problem would be specific to a backend, so I
 Charlie> didn't try any others. Also, when I have more than one
 Charlie> subplot, nothing is drawn period.
tkagg works for me, as do multiple subplots. Weird. I'm using
examples/span_selector.py. You too?
JDH
From: Charlie M. <cw...@gm...> - 2005年11月10日 18:44:58
 I will have to do more testing, but I am calling
figure.subplots_adjust, not adjusting with the widget. This is also
through the oo interface. I will try to write a sample script and get
back to the list.
Thanks,
On 11/9/05, John Hunter <jdh...@ac...> wrote:
> >>>>> "Charlie" =3D=3D Charlie Moad <cw...@gm...> writes:
>
> Charlie> I guess I should have mentioned TkAgg CVS. I didn't
> Charlie> think the problem would be specific to a backend, so I
> Charlie> didn't try any others. Also, when I have more than one
> Charlie> subplot, nothing is drawn period.
>
> tkagg works for me, as do multiple subplots. Weird. I'm using
> examples/span_selector.py. You too?
>
> JDH
>
From: Charlie M. <cw...@gm...> - 2005年11月10日 20:02:24
So this happens with TkAgg and blitting. Here is the sample script:
#!/usr/bin/env python
import matplotlib; matplotlib.use('TkAgg')
import pylab
from matplotlib.widgets import SpanSelector
fig =3D pylab.figure()
ax =3D fig.add_subplot(111)
ax.plot(pylab.rand(100))
def onselect(vmin, vmax):
 print vmin, vmax
span =3D SpanSelector(ax, onselect, 'horizontal', useblit=3DTrue,
 rectprops=3Ddict(alpha=3D0.5, facecolor=3D'red') )
pylab.show()
Adjust the subplot params then you will see the distortion. With 2
subplots the spanselector never visually appears, but the callback is
called.
Thanks,
 Charlie
On 11/9/05, Charlie Moad <cw...@gm...> wrote:
> I will have to do more testing, but I am calling
> figure.subplots_adjust, not adjusting with the widget. This is also
> through the oo interface. I will try to write a sample script and get
> back to the list.
>
> Thanks,
>
> On 11/9/05, John Hunter <jdh...@ac...> wrote:
> > >>>>> "Charlie" =3D=3D Charlie Moad <cw...@gm...> writes:
> >
> > Charlie> I guess I should have mentioned TkAgg CVS. I didn't
> > Charlie> think the problem would be specific to a backend, so I
> > Charlie> didn't try any others. Also, when I have more than one
> > Charlie> subplot, nothing is drawn period.
> >
> > tkagg works for me, as do multiple subplots. Weird. I'm using
> > examples/span_selector.py. You too?
> >
> > JDH
> >
>
From: Charlie M. <cw...@gm...> - 2005年11月18日 20:46:11
A challenge to the community! ;)
Run the current cursor.py example with the TkAgg backend. (blitting
should be on)
i.e. python cursor.py -dTkAgg
Why does the blitting not update the entire axis? Any help on this is
greatly appreciated.
Thanks,
 Charlie
On 11/10/05, Charlie Moad <cw...@gm...> wrote:
> So this happens with TkAgg and blitting. Here is the sample script:
>
> #!/usr/bin/env python
> import matplotlib; matplotlib.use('TkAgg')
> import pylab
> from matplotlib.widgets import SpanSelector
>
> fig =3D pylab.figure()
> ax =3D fig.add_subplot(111)
>
> ax.plot(pylab.rand(100))
> def onselect(vmin, vmax):
> print vmin, vmax
>
> span =3D SpanSelector(ax, onselect, 'horizontal', useblit=3DTrue,
> rectprops=3Ddict(alpha=3D0.5, facecolor=3D'red') )
>
> pylab.show()
>
> Adjust the subplot params then you will see the distortion. With 2
> subplots the spanselector never visually appears, but the callback is
> called.
>
> Thanks,
> Charlie
>
> On 11/9/05, Charlie Moad <cw...@gm...> wrote:
> > I will have to do more testing, but I am calling
> > figure.subplots_adjust, not adjusting with the widget. This is also
> > through the oo interface. I will try to write a sample script and get
> > back to the list.
> >
> > Thanks,
> >
> > On 11/9/05, John Hunter <jdh...@ac...> wrote:
> > > >>>>> "Charlie" =3D=3D Charlie Moad <cw...@gm...> writes:
> > >
> > > Charlie> I guess I should have mentioned TkAgg CVS. I didn't
> > > Charlie> think the problem would be specific to a backend, so I
> > > Charlie> didn't try any others. Also, when I have more than one
> > > Charlie> subplot, nothing is drawn period.
> > >
> > > tkagg works for me, as do multiple subplots. Weird. I'm using
> > > examples/span_selector.py. You too?
> > >
> > > JDH
> > >
> >
>
From: John H. <jdh...@ac...> - 2005年11月18日 21:28:45
>>>>> "Charlie" == Charlie Moad <cw...@gm...> writes:
 Charlie> A challenge to the community! ;) Run the current
 Charlie> cursor.py example with the TkAgg backend. (blitting
 Charlie> should be on) i.e. python cursor.py -dTkAgg
 Charlie> Why does the blitting not update the entire axis? Any
 Charlie> help on this is greatly appreciated.
THere was a flipy offset needed in _tkagg.cpp
 int srcheight = (int)aggRenderer->get_height();
 //...
 desty = srcheight-(int)t; 
I just commited this to CVS -- take it for a test drive.
Checking in src/_tkagg.cpp;
/cvsroot/matplotlib/matplotlib/src/_tkagg.cpp,v <-- _tkagg.cpp
new revision: 1.10; previous revision: 1.9
JDH
From: Charlie M. <cw...@gm...> - 2005年11月19日 15:21:40
Awesome, thanks! Out of curiousity... did you figure this out
visually or by comparing with something?
- Charlie
On 11/18/05, John Hunter <jdh...@ac...> wrote:
> >>>>> "Charlie" =3D=3D Charlie Moad <cw...@gm...> writes:
>
> Charlie> A challenge to the community! ;) Run the current
> Charlie> cursor.py example with the TkAgg backend. (blitting
> Charlie> should be on) i.e. python cursor.py -dTkAgg
>
> Charlie> Why does the blitting not update the entire axis? Any
> Charlie> help on this is greatly appreciated.
>
> THere was a flipy offset needed in _tkagg.cpp
>
> int srcheight =3D (int)aggRenderer->get_height();
> //...
> desty =3D srcheight-(int)t;
>
> I just commited this to CVS -- take it for a test drive.
>
> Checking in src/_tkagg.cpp;
> /cvsroot/matplotlib/matplotlib/src/_tkagg.cpp,v <-- _tkagg.cpp
> new revision: 1.10; previous revision: 1.9
>
> JDH
>
From: John H. <jdh...@ac...> - 2005年11月19日 16:12:19
>>>>> "Charlie" == Charlie Moad <cw...@gm...> writes:
 Charlie> Awesome, thanks! Out of curiousity... did you figure
 Charlie> this out visually or by comparing with something?
Let's just say I've encountered the flipy bug before :-)
JDH
From: Charlie M. <cw...@gm...> - 2005年11月22日 16:27:09
Arg! One petty thing after another. Here is a simple script
demonstrating that the last row does not render the SpanSelector, yet
the callback works fine???
------------------------------------
import matplotlib
from matplotlib.widgets import SpanSelector
matplotlib.use('TkAgg')
from pylab import *
s =3D 3
axs =3D [subplot(s,s,i) for i in xrange(1,s**2+1)]
def onselect(x, y): print x, y
[SpanSelector(a, onselect, 'vertical', useblit=3DTrue) for a in axs]
show()
------------------------------------
Any clues as to where to look for this bug? Sorry to be a hassle, but
I need this specifically to embed in a Tk only app.
Thanks,
 Charlie
On 11/19/05, John Hunter <jdh...@ac...> wrote:
> >>>>> "Charlie" =3D=3D Charlie Moad <cw...@gm...> writes:
>
> Charlie> Awesome, thanks! Out of curiousity... did you figure
> Charlie> this out visually or by comparing with something?
>
> Let's just say I've encountered the flipy bug before :-)
>
> JDH
>
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 によって変換されたページ (->オリジナル) /