I want to plot the data points that are in a 1-D array just along the horizontal axis [edit: at a given y-value], like in this plot:

How can I do this with pylab?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Staven already edited his post to include how to plot the values along y-value 1, but he was using Python lists.
A variant that should be faster (although I did not measure it) only uses numpy arrays:
As a nice-to-use function that offers all usual matplotlib refinements via kwargs this would be: