From: Jerzy Karczmarczuk <jerzy.karczmarczuk@un...>  20120527 16:56:34

Gordon Hardmant : > I ...cannot find a simple way to stop a curve being drawn once it crosses > another curve. In the attached example, I am trying to draw the solid > curve only until it intersects the dashed one. I have tried using the > numpy.where() method, but it does not seem to be the right way to go > about it I end up having to write FOR loops and so on, and that does > not make use of the vectorization advantages of numpy. Try to insert just before plot(...) the following two lines: igc=np.sign(ig_bdryig_d2) ig_d2[igc!=igc[1] ]=np.nan This [1] is a place which discriminates where the difference sign is "good". Of course this will produce some bedlam if there are many intersections. You didn't say whether you want to plot the dashed curve entirely. If not, just truncate all three, the solid, the dashed and the abscissa, where the sign is OK. Good luck. Jerzy Karczmarczuk Caen, France 