[Scilab-Dev] Retrieving handle on a plotted polyline

Caio Souza caioc2bolado at gmail.com
Thu Jun 16 21:12:35 CEST 2016


Hi,

(Aside of being in the dev list),

If you are up to work with java/c++ you can take a look at
 scilab/modules/gui/src/java/org/scilab/modules/gui/editor/EntityPicker.java,
there you can find examples to select various graphics entities given a
window and a click position. Extending a click to a selection box wouldnt
require too much work.

If you prefer to use xclick(), an idea to make it would be:

create a macro which ask for 2 clicks with xclick(), since xclick() gives
you the position in the current axes you can simple traverse through the
graphics objects tree, from a gcf() or gca() checking which ones are
crossing the box. The down side from this idea is that actually drawing the
box would be tricky.

My best advice for the box is to use rubberbox() macro, it ask for a click
 to start drawing the box and after the 2nd click it end the box and
returns the first point and the width/height of the box. With this
information you can easily traverse the objects tree and check for crossing.

Best.

Caio SOUZA

On Thu, Jun 16, 2016 at 6:36 AM, Clément David <
clement.david at scilab-enterprises.com> wrote:

> Hello Erik,
>
> The dev ML is used for Scilab "development" questions for Scilab internal
> features so you might
> probably prefer to ask the user ML <users at lists.scilab.org>.
>
> My 2cents to help you, that's possible to implement using xclick() or axes
> click handler (from a
> user point of view).
>
> If you prefer to dive into the scilab code and use some Java/C++ skills it
> might be possible to
> implement this feature as a specific editor : you are on the right ML :) !
>
> Thanks,
>
>> Clément
>
> Le jeudi 16 juin 2016 à 06:36 +0000, Erik Bjørklund a écrit :
> > Hi,
> > I have several plots in one figure, and each plot contains several
> curves.
> > I would like to incorporate an interactive feature. This feature should
> use
> > a selection box to select curves crossing into the box. Then the feature
> > should give me the handles of all the polylines selected.
> >
> > Any ideas?
> >
> > Best
> >
> > Erik
> >
> > _______________________________________________
> > dev mailing list
> > dev at lists.scilab.org
> > http://lists.scilab.org/mailman/listinfo/dev
> _______________________________________________
> dev mailing list
> dev at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20160616/2df3d55b/attachment.htm>


More information about the dev mailing list