[Numpy-discussion] Fwd: Re: Creating parallel curves

Kiko kikocorreoso@gmail....
Tue Feb 14 01:35:08 CST 2012


2012/2/13 Andrea Gavana <andrea.gavana@gmail.com>

> ---------- Forwarded message ----------
> From: "Andrea Gavana" <andrea.gavana@gmail.com>
> Date: Feb 13, 2012 11:31 PM
> Subject: Re: [Numpy-discussion] Creating parallel curves
> To: "Jonathan Hilmer" <jkhilmer@gmail.com>
>
> Thank you Jonathan for this, it's exactly what I was looking for. I' ll
> try it tomorrow on the 768 well trajectories I have and I'll let you know
> if I stumble upon any issue.
>
> If someone could shed some light on my problem number 2 (how to adjust the
> scaling/distance) so that the curves look parallel on a matplotlib graph
> even though the axes scales are different, I'd be more than grateful.
>
> Thank you in advance.
>

Hi.
Maybe this could help you as a starting point.

*from Shapely.geometry import LineString
from matplotlib import pyplot

myline = LineString(...)
x, y = myline.xy

xx, yy =  myline.buffer(distancefrommyline).exterior.xy  # coordinates
around myline

pyplot.plot(x, y)
pyplot.plot(xx,yy)
pyplot.show()*

Best.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120214/a5d096f9/attachment.html 


More information about the NumPy-Discussion mailing list