Nils,

Perhaps the rectangle selector might be of use? It defaults to a draw mode
of 'box', but you can set it to line so that it looks like a ruler widget.
http://matplotlib.org/api/widgets_api.html#matplotlib.widgets.RectangleSelector

I can imagine that you could set up a selector callback that could then
query the data on the graph to "snap" the final line to the nearest points
on the graph, creating a Line2D object on the fly. Is that what you are
looking for?

Cheers!
Ben Root



On Thu, Dec 11, 2014 at 8:47 AM, Nils Wagner <nils...@googlemail.com> wrote:
>
> Hi all,
>
> how can I create line segments between consecutive selected points of a
> scatter plot in an interactive manner ? It should be possible to create
> several unclosed polygonal lines. Each polygonal line might have
> a different color.
>
> A small example is appreciated.
>
> Thanks in advance.
>
>
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/line-segments-in-a-scatter-plot-tp44602.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to