Solved

Error bars in matplotlib

Posted on 2011-09-13
2
516 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

A set of related code is known to be a Module, it helps us to organize our code logically which is much easier for us to understand and use it. Module is an object with arbitrarily named attributes which can be used in binding and referencing. …
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 lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
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…

760 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

22 Experts available now in Live!

Get 1:1 Help Now