Combine ListPlot and ErrorListPlot in Mathematica?

  • Context: Mathematica 
  • Thread starter Thread starter wren11
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary
SUMMARY

The discussion focuses on combining ListPlot and ErrorListPlot in Mathematica to include error bars while maintaining the ability to customize the plot's appearance. The user initially utilizes ListPlot for graphing data points but encounters limitations when attempting to add error bars using ErrorListPlot, which restricts customization options such as legends and appearance settings. A suggested solution involves using the "hold on" command to retain the graph while making adjustments. Ultimately, the user seeks a method to integrate error bars into ListPlot without sacrificing customization capabilities.

PREREQUISITES
  • Familiarity with Mathematica's ListPlot function
  • Understanding of ErrorListPlot for adding error bars
  • Knowledge of plot customization options in Mathematica
  • Basic command usage in Mathematica, including "hold on"
NEXT STEPS
  • Explore advanced customization techniques in Mathematica's ListPlot
  • Learn how to effectively use ErrorListPlot with legends in Mathematica
  • Investigate the "Show" function for combining multiple plots in Mathematica
  • Research error bar visualization best practices in data presentation
USEFUL FOR

This discussion is beneficial for data analysts, researchers, and students using Mathematica who need to visualize data with error bars while maintaining plot customization features.

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
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
11K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K