[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating interactive Qt plots

From: mmuetzel
Subject: Re: creating interactive Qt plots
Date: Sun, 31 Dec 2017 09:29:33 -0700 (MST)

Andreas Weber-6 wrote
> Dear all,
> ich wanted to add some examples to the wiki which shows how to interact
> with plots using callbacks.
> The idea was to have a triangle and enables the user to drag the corners
> around (code follows at the bottom)
> My first surprise was that the marker and lines have (now?) their own
> callback and the figure callback isn't triggered when a line or a marker
> is clicked even when there is no callback for the line/marker.

Hi Andy,

this Mathwork's page gives a good overview of the "PickableParts" and
"HitTest" properties. So what you are describing is the correct behaviour as
long as you leave these properties to their default. That said, I haven't
checked whether these properties work the same in Octave.

Guten Rutsch

PS: I like your example code. Maybe you could add some logic to prevent
concurrent execution of "drag_fig" (like setting a persistent variable to
true while the callback is running). I found that this is necessary in
Matlab when a function might be called from different callbacks (the
"buttondownfcn" and the "windowbuttonmotionfcn" in your second variant). I
don't know how "forgiving" Octave is in this respect.

Sent from:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]