Solved

Error bars in matplotlib

Posted on 2011-09-13
2
519 Views
Last Modified: 2012-05-12
Hi

I would like to plot a graph with errors bars.

Suppose, for example, that my x and y values are

x = (0,1,2,3) and y = (4,7,2,10)

I can plot this using

plt.plot(x,y)
plt.show()

However, what I want to do now is to display some error bars on these points.For example, for the point at x = 0, the y value may not be exactly y=4 and may be a minimum of 3.6 and a maximum of 4.2.

I could like to draw a vertical line between these limits and also write the 3.6 and 4.2 labels on the line (other points would have different errors and labels).

Can anybody tell me how to do this?

Thanks in advance

Issac
0
Comment
Question by:IssacJones
2 Comments
 
LVL 28

Accepted Solution

by:
pepr earned 250 total points
ID: 36528923
0
 

Author Closing Comment

by:IssacJones
ID: 36529554
Thanks pepr
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Less strange, but still introduction This introduction was added (1st August, 2011) to reflect some reactions.  Firstly, the term basics in the title of the article...  As any other word, it is a symbol with meaning attached to the word by some a…
Sequence is something that used to store data in it in very simple words. Let us just create a list first. To create a list first of all we need to give a name to our list which I have taken as “COURSE” followed by equals sign and finally enclosed …
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now