×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Plotting errorbars of multiple datasets- Please help

Plotting errorbars of multiple datasets- Please help

Plotting errorbars of multiple datasets- Please help

(OP)
Hello everyone
I have been trying to plot multiple data sets (actually mean of 1000 simulation results) and their standard deviations on the same graph for some time now. However I havent been able to find a decent way of doing this. Currently I know i can plot:
1) multiple datasets using the plot(X1,mean(Y1),'b*',X2,mean(Y2),'r+-'.....) scheme or
2) plot a single dataset's mean and stdDev using errorbar(X1, mean(Y1),std(Y1)).
but i cant plot two the sets together! (I also want to give different color and legend names to each of them).

Can any body give me the best way to do this?



RE: Plotting errorbars of multiple datasets- Please help

Hi,
Arrange, for example, your data sets in cell array.
Create a cell array of color spec:
Col={'k' 'b' 'c' 'r' 'y' 'm'}
Then loop:

for n =1:N
   errorbar(X{n},Y{n},e{n},Col{n});
   hold on
end
legend('series 1','series2;,'series 3', ...)


Joe Sababa

BSTeX - Equation viewer for Matlab
http://www.geocities.com/bstex2001/

Joe
BSTeX- Equation viewer for Matlab
http://www.geocities.com/bstex2001

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now