determining of a line segment is a Line2D

Hi
Is there a simple way to do the following

l1=Line2D(xdata=[1,2,3],ydata=[4,5,6])

l2=Line2D(xdata = [1].ydata=[3])

if l2 in l1 #error, Line2D not iterable

-Mathew

Haven’t tried it, but you might want to look at matplotlib.path.contains_path() or matplotlib.path.path_in_path()?

Ben Root

···

On Mon, Aug 15, 2011 at 4:56 PM, Mathew Yeates <mat.yeates@…83…287…> wrote:

Hi

Is there a simple way to do the following

l1=Line2D(xdata=[1,2,3],ydata=[4,5,6])

l2=Line2D(xdata = [1].ydata=[3])

if l2 in l1 #error, Line2D not iterable

-Mathew