Error Bars On Grouped Bar Plot Matlab
Contents |
Support Answers MathWorks Search MathWorks.com MathWorks Answers Support MATLAB Answers™ MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link barplot with error bars matlab Exchange ThingSpeak Anniversary Home Ask Answer Browse More Contributors Recent Activity matlab bar graph with error bars Flagged Content Flagged as Spam Help MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader how to add error bars to a bar graph in matlab Link Exchange ThingSpeak Anniversary Home Ask Answer Browse More Contributors Recent Activity Flagged Content Flagged as Spam Help Trial software MathWorks Support Team (view profile) 13,593 questions 13,593 answers barwitherr 13,592 accepted answers Reputation: 2,574 Vote1 How do I place errorbars on my grouped bar graph using function ERRORBAR in MATLAB 7.13 (R2011b)? Asked by MathWorks Support Team MathWorks Support Team (view profile) 13,593 questions 13,593 answers 13,592 accepted answers Reputation: 2,574 on 16 Dec 2011 Latest activity Commented on by KV KV (view profile) 2 questions
Matlab Barwitherr
0 answers 0 accepted answers Reputation: 0 on 5 Oct 2016 at 14:32 Accepted Answer by MathWorks Support Team MathWorks Support Team (view profile) 13,593 questions 13,593 answers 13,592 accepted answers Reputation: 2,574 833 views (last 30 days) 833 views (last 30 days) I use the following to create a grouped bar graph: model_series = [10 40 80; 20 50 90; 30 60 100]; model_error = [1 4 8; 2 5 9; 3 6 10]; bar(model_series, 'grouped'); hold on errorbar( model_series,model_error)The result is a grouped bar graph with error bars placed in between each group of bars.I would like to have ERRORBAR place the error bar in the center of each bar. 1 Comment Show all comments d p d p (view profile) 0 questions 3 answers 0 accepted answers Reputation: 0 on 7 Jul 2016 Direct link to this comment: https://www.mathworks.com/matlabcentral/answers/102220#comment_377938 Did you just answer yourself? Tags barerrorbargrouped Products MATLAB Related Content 2 Answers MathWorks Support Team (view profile) 13,593 questions 13,593 answers 13,592 accepted answers Reputation:
Support Support Newsreader MathWorks Search MathWorks.com MathWorks Newsreader Support MATLAB Newsgroup MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Post A New Message Advanced Search Help MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Post A
Matlab Grouped Bar Graph
New Message Advanced Search Help Trial software bar chart with error bars Subject: bar chart with error matlab barweb bars From: Kevin Murphy Date: 8 May, 2000 18:39:14 Message: 1 of 13 Reply to this message Add author to My Watch List View original barwitherr matlab 2015 format Flag as spam Does anyone know how to add error bars to a bar chart? Kevin Subject: bar chart with error bars From: John Williams Date: 9 May, 2000 12:04:40 Message: 2 of 13 Reply to this message Add author to My https://www.mathworks.com/matlabcentral/answers/102220-how-do-i-place-errorbars-on-my-grouped-bar-graph-using-function-errorbar-in-matlab-7-13-r2011b Watch List View original format Flag as spam Kevin Murphy wrote: > > Does anyone know how to add error bars to a bar chart? with the ERRORBAR command perhaps? or are you looking for something different to what that provides? Still, it should give you a starting point. John Subject: bar chart with error bars From: Kevin Murphy Date: 8 May, 2000 19:59:14 Message: 3 of 13 Reply to this message Add author to My Watch List View original format Flag as spam I call https://www.mathworks.com/matlabcentral/newsreader/view_thread/16510 'bar' on a matrix, so it gives me clusters of vertical bars like this * * * ** * ** ** I want to superimpose vertical error bars on these... Subject: bar chart with error bars From: John Williams Date: 9 May, 2000 16:14:08 Message: 4 of 13 Reply to this message Add author to My Watch List View original format Flag as spam Kevin Murphy wrote: > > I call 'bar' on a matrix, so it gives me clusters of vertical bars like > this > > * > * * > ** * > ** ** > > I want to superimpose vertical error bars on these... You already know the upper/lower error bounds, and just want to draw them on the graph? I don't know the exact answer off the top of my head, but I think you would get some good ideas by looking at the file errorbar.m Have you searched the user-contributed files and "solution search" at www.mathworks.com? That's also a good source for things which you think "surely somebody has wanted to do this before"! John Subject: bar chart with error bars From: Michael Robbins Date: 9 May, 2000 05:25:03 Message: 5 of 13 Reply to this message Add author to My Watch List View original format Flag as spam I'm not sure I understand the question. Why not use BAR, then HOLD ON, then ERRORBAR? Michael Robbins, CFA Director, Proprietary Trading Debt Capital Markets Canadian Imperial Bank of Commerce, World Markets * Sent from RemarQ http://www.remarq.com The Inte
Support Answers MathWorks Search MathWorks.com MathWorks Answers Support MATLAB Answers™ MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Ask Answer Browse More Contributors Recent Activity https://www.mathworks.com/matlabcentral/answers/305991-how-can-i-put-error-bars-in-grouped-bar-plot Flagged Content Flagged as Spam Help MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Ask Answer Browse More Contributors Recent Activity Flagged Content Flagged as Spam Help http://stackoverflow.com/questions/14256383/how-to-plot-a-grouped-bar-chart-with-errors-bar-as-shown-in-the-figure Trial software Arshad (view profile) 2 questions 0 answers 0 accepted answers Reputation: 0 Vote0 How can i put error bars in grouped bar plot? Asked by Arshad Arshad (view profile) 2 questions 0 error bars answers 0 accepted answers Reputation: 0 on 6 Oct 2016 at 5:38 Latest activity Commented on by Arshad Arshad (view profile) 2 questions 0 answers 0 accepted answers Reputation: 0 on 7 Oct 2016 at 10:14 16 views (last 30 days) 16 views (last 30 days) Hi All, My data are as follow: pw=[900 1200 1500]; % x-axis databc=[13.40 38.07 48.53; 14.47 31.53 54.00; 16.37 31.17 52.47]; %Y-axis with error bars dataerr = [1.222 2.557 3.735 0.933 3.526 2.615 1.994 3.675 1.833]; % errors for y dataI am trying to plot the grouped bar graph with error bars in Matlab 2014b, but I was not successful. I would appreciate if any one can help me in solving this problem. 0 Comments Show all comments Tags bar ploterror bars Products No products are associated with this question. Related Content 1 Answer dbmn (view profile) 1 question 19 answers 8 accepted answers Reputation: 42 Vote0 Link Direct link to this answer: https://www.mathworks.com/matlabcentral/answers/305991#answer_237898 Answer by dbmn dbmn (view profile) 1 question 19 answers 8 accepted answers Reputation: 42 on 7 Oct 2016 at 7:46 In the File-Exchange there is a function that does exactly what you want.https://de.mathworks.com/matlabcentral/fileexchange/30639-barwitherr-errors-varargin- 1 Comment Show all comments Arshad Arshad (view profile) 2 questions 0 answers 0 accepted answers Reputation: 0 on 7 Oct 2016 at 10:14 Direct link to this comment: https://www.mathworks.com/matlabcentral/answers/305991#comment_396717 Hi, I tried to use barwith err function and the following code. But it is giving me this message "Undefined function 'barwitherr' for input arguments of type 'double'."y=[0.33,0.362]; errY=[0.017,0.054]; h=barwitherr(errY,y); set(h(1),'FaceColor','g') Log In to answer or comment on this question. Related Content Join the 15-year community celebration. Play games a
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to plot a grouped bar chart with errors bar as shown in the figure? up vote 4 down vote favorite 3 I am trying to plot a grouped bar chart like the one in the figure below. I found the errorbar() function, but so far I cannot figure it out how to make it. Here is my code. Y = [0.9322225 0.86225 0.8973; 0.8953635 0.862868 0.8099605; 0.7473585 0.675698 0.80484]; bar(Y, 'grouped') bar(Y, 'BarWidth', 0.5); set(gca,'XTickLabel',{'', 'ML', '', 'HSV', '', 'NCC'}); Any advise or guidance would be greatly appreciated. Credit: This figure is from the work of Sanin et al. "Shadow Detection: A Survey and Comparative Evaluation of Recent Methods." matlab share|improve this question edited Jan 10 '13 at 12:37 asked Jan 10 '13 at 11:01 zkan 501515 Please post some code to show what you have tried so far. I'm sure you can at least a bar chart to plot, probably a grouped one. –Dan Jan 10 '13 at 12:10 Hi Dan, thank you for mentioning. I've edited my post. –zkan Jan 10 '13 at 12:40 add a comment| 2 Answers 2 active oldest votes up vote 5 down vote accepted I'm not 100% how to replicate that graph but maybe this will help you get started. I found this on the File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/30639-bar-chart-with-error-bars/content/barwitherr.m, give that a try in for plotting a bar chart with error bars. It allows for asymmetrical error bars and I reckon that if you want to make the markers different (like the squares and circles in your example) then you need to alter this line in the code in the link: errorbar(mean(x,1),values(xOrder,col),lowerErrors(xOrder,col), upperErrors(xOrder, col), '.k') to something like: errorbar(mean(x,1),values(xOrder,col),lowerErrors(xOrder,col), 'ok'); errorbar(mean(x,1),values(xOrder,col), upperErrors(xOrder, col), '*k') Also if you want all three groups to have labels try set(gca,'XTickLabel',{'ML', 'HSV', 'NCC'}); Also check out colormap(summer) and help legend share|improve this answer answered Jan 10 '13 at 13:29 Dan 32.7k63475 Thank you very much. I'm