[SciPy-user] plot vertical lines
Mon Jul 13 08:32:56 CDT 2009
Thanks it worked.
But I observed that for the values I gave you,
you altered them a bit before it plotted it just
they way I expected. Is there some formula
for this sort of plot?
From: Angus McMorland <email@example.com>
To: SciPy Users List <firstname.lastname@example.org>
Sent: Monday, July 13, 2009 2:31:17 PM
Subject: Re: [SciPy-user] plot vertical lines
2009/7/13 Afi Welbeck <email@example.com>:
> I'm a newbie. I'm stuck trying to link the following
> points with vertical lines in the xy plane
> (1,1) (1,4) and (3,2) (3,6)
> Could anyone please help me with the code?
Here's an verbose way to do it, so you can see what's going on. You'll
need matplotlib installed for this, and it's the generally recommended
2-d graphics package to accompany scipy.
import matplotlib.pyplot as plt
x0 = [1,1]
y0 = [1,4]
x1 = [3,3]
y1 = [2,6]
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(x0, y0, x1, y1)
Hoping that helps,
Post-doctoral research fellow
Neurobiology, University of Pittsburgh
SciPy-user mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user