Python Forum
How to create custom error bars in matplotlib.pyplot?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to create custom error bars in matplotlib.pyplot?
#1
I have created a list of average monthly temperatures and the high and low temperatures for each month. I am being asked to create a bar graph for each month's average temperature, and then add error bars where the upper limit of the error bar is the highest temperature that month, and the lower limit of the error bar is the lowest temperature of that month. The graph I made is below, but how do I add vertical error bars where I specify the upper and lower limits of it? I know how to use yerror but from what I have seen that only produces symmetrical error bars whereas mine would be different lengths above and below the graph.
plt.bar(list_of_months, average_temps)
Reply


Messages In This Thread
How to create custom error bars in matplotlib.pyplot? - by wlsa - Nov-04-2018, 06:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Issues with matplotlib.pyplot schniefen 2 2,330 Apr-19-2019, 11:51 AM
Last Post: schniefen
  How to customize x axis in matplotlib.pyplot for a scatter plot? wlsa 9 8,320 Nov-10-2018, 01:32 AM
Last Post: wlsa
  Please help with Create Custom class Robot(): TheRealOne 5 3,227 Nov-05-2018, 03:41 AM
Last Post: ichabod801
  Pyplot line color and spacing/padding metalray 0 2,720 May-26-2017, 08:39 AM
Last Post: metalray

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020