I usually do something like:
y=np.array([60,80,120,180])
x = np.ones_like(y)*3
plt.plot(x, y,'+',markersize=8,mec='k')
David G. Parker
From: Benjamin Root <ben.r...@ou.edu>
To: Ulrich vor dem Esche <ulrich.es...@googlemail.com>
Cc: matplotlib-users@lists.sourceforge.net
Date: 06/06/2012 12:15 PM
Subject: Re: [Matplotlib-users] scatter plot with constant x
On Tue, Jun 5, 2012 at 11:53 AM, Ulrich vor dem Esche <
ulrich.es...@googlemail.com> wrote:
Hey! :o)
This should be simple, but i cant manage: I need to plot many dots with
the same x, like
plt.plot([3,3,3,3],[60,80,120,180],'+',markersize=8,mec='k')
The array for x values is silly, especially since the number of y values
may be rather large. Is there a way to enter a constant there?
Cheers to you all!
Ulli
No, but you can do this:
plt.plot([3] * 4, [60, 80, 120, 180], ...)
Does that help?
Ben Root
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users