Mathematica Combine ListPlot and ErrorListPlot in Mathematica?

  • Thread starter Thread starter wren11
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary
To combine ListPlot and ErrorListPlot in Mathematica while maintaining the ability to customize appearance, legends, and ticks, users face challenges integrating error bars into their plots. The primary issue arises when attempting to add error bars using ErrorListPlot, which limits customization options such as legends and appearance adjustments. A suggested solution involves using the Show function to overlay plots, but this often results in losing the ability to customize features like legends and ticks. A workaround mentioned is to use the "hold on" command to retain the graph while making adjustments. Users seek effective methods to incorporate error bars into ListPlot without sacrificing customization capabilities.
wren11
Messages
1
Reaction score
0
Combine ListPlot and ErrorListPlot in Mathematica??

Hello,

I'm pretty new to Mathematica and I'm having a problem getting error bars on a plot. I've been using ListPlot to graph points and then edit the appearance of the graph / include legend etc by:
ListPlot["meansdata", Frame -> {{True,False},{True,False}},FrameLabel ->{"Month","Group Size"}, FrameTicks -> {{{1,"Jan"},{2,"Feb"},{3,"Mar"},{4,"Apr"},{5,"May"},{6,"Jun"},{7,"Jul"},{8,"Aug"},{9,"Sep"},{10,"Oct"},{11,"Nov"},{12,"Dec"}},Automatic}, PlotLegend -> {"2009","2010"}] plus LegendPosition / PlotStyle / PlotRange etc.

I would like to add in error bars to this plot but it seems the only way to generate a graph with error bars is to use ErrorListPlot. With this, I seem to lose the option to include a legend and changing the appearance isn't working in the same way. I've tried combining the regular ListPlot and the ErrorListPlot with Show. This only works if I haven't included a legend or changed the appearance.

How can I add error bars to a ListPlot and still edit the appearance, legend, ticks etc? Any help would be greatly appreciated!
 
Physics news on Phys.org


try:

hold on

That should "hold" the graph on the screen while you make changes.
 

Similar threads

  • · Replies 18 ·
Replies
18
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
11K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K