SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] canvas objects

From: Paul K. <pki...@ni...> - 2007年07月06日 15:41:01
On Fri, Jul 06, 2007 at 10:15:48AM -0500, John Hunter wrote:
> On 7/6/07, Paul Kienzle <pki...@ni...> wrote:
> > Hi,
> >
> > I've been playing with the pick infrastructure in 0.90 and find that
> > it doesn't meet my needs. The issue is that events from all artists
> > go to the same callback, so you are forced write your callback as a
> > series of if statements for each artist which may receive a pick event.
> 
> I definitely agree that having to write one callback for all the
> different objects you may want to pick on is a bad design, so I'd be
> happy to see something better. Do you think it would make sense to
> register callbacks with a given artist -- eg if you are picked call me
> -- or with a class (eg all Line3D picks call me), or do you have
> another approach in mind?
I definitely want to be able to associate different callbacks with
different specific artists. For example, I might want to define
a gaussian peak that I want to drag around and match to the peak in
some data. The data and the peak will both be represented using lines,
but I only want to drag the peak, not the data.
Having a default callback for a class may be useful in many places
as well, such as automatically highlighting the corresponding legend
entry on mouseover. For now I have no opinion on whether the additional
complexity is worthwhile.
	- Paul

View entire thread

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 によって変換されたページ (->オリジナル) /