Plot Error Bars Log Scale
Contents |
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
Logarithmic Error Calculation
Ask Answer Browse More Contributors Recent Activity Flagged Content Flagged as Spam standard error of log transformed data Help MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Ask
Error Propagation Log Base 10
Answer Browse More Contributors Recent Activity Flagged Content Flagged as Spam Help Trial software MathWorks Support Team (view profile) 13,649 questions 13,649 answers 13,648 accepted answers Reputation: 2,644 Vote0 How http://faculty.washington.edu/stuve/log_error.pdf can I use the ERRORBAR function with a logarithmic axis in MATLAB? Asked by MathWorks Support Team MathWorks Support Team (view profile) 13,649 questions 13,649 answers 13,648 accepted answers Reputation: 2,644 on 27 Jun 2009 Latest activity Commented on by Ohad BarSimanTov Ohad BarSimanTov (view profile) 0 questions 0 answers 0 accepted answers Reputation: 0 on 27 Jul 2016 Accepted Answer https://www.mathworks.com/matlabcentral/answers/99844-how-can-i-use-the-errorbar-function-with-a-logarithmic-axis-in-matlab by MathWorks Support Team MathWorks Support Team (view profile) 13,649 questions 13,649 answers 13,648 accepted answers Reputation: 2,644 324 views (last 30 days) 324 views (last 30 days) When I type the following at the MATLAB prompt, I get a an errorbar with a log x axis:x = 1:100; y = sin(x); e = std(y)*ones(size(x)); errorbar(x,y,e) set(gca,'xscale','log') However, the errorbars of the first point in the resulting figure extend much farther than the other errorbars. I would like a function that can account for the logrithmic X-axis and make all of the errorbars have a uniform width. 1 Comment Show all comments Ohad BarSimanTov Ohad BarSimanTov (view profile) 0 questions 0 answers 0 accepted answers Reputation: 0 on 27 Jul 2016 Direct link to this comment: https://www.mathworks.com/matlabcentral/answers/99844#comment_381798 This is what I got after using others comments, here and stack overflow.errorbar(X,Y,E,'bo','linewidth',2) c=get(gca,'Children'); for i=1:length(c); set(c(i),'XData',get(c(i),'YData'),'YData',get(c(i),'XData')); end; axis([10^-5 10^-3 0.4 1]) % This is just to set the (Y and X) axis (flipped) set(gca,'xscale','log'); % set X log scale view(-90, 90) % Swap the axes if you want Y log scale (you
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 http://mathematica.stackexchange.com/questions/49123/how-to-plot-data-with-error-bars-on-a-log-scale-in-mathematica-9 company Business Learn more about hiring developers or posting ads with us Mathematica Questions Tags Users Badges Unanswered Ask Question _ Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How to plot data with error error bars bars on a log scale in Mathematica 9? up vote 1 down vote favorite 2 I have data in the form d={{x1,y1,dy1},{x2,y2,dy2},..{xn,yn,dyn}}; so the error bars are different for each coordinate pair. I want to plot on a logarithmic x-scale. Since I use Mathematica 9 the old library from Mathematica 6 with Errorlogplot does not seem to work. Kind regards Benjamin plotting data share|improve this question edited Jun 4 '14 at 18:15 asked error bars on Jun 4 '14 at 17:36 neverender 234 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote Try the ErrorBarLogPlots package, which you can download here: Throw it in the folder that opens after evaluating this: SystemOpen@FileNameJoin[{$UserBaseDirectory, "Applications"}] Then load the package in Mathematica and go: << ErrorBarLogPlots` ErrorListLogLogPlot[{{1, 2, 2}, {2, 3, 1}, {4, 4, 2.6}, {9.5, 12, 5}}, Frame -> True, PlotRangePadding -> 0.1] Other plots available in this package are: ErrorListLogLinearPlot ErrorListLogPlot share|improve this answer edited Jun 4 '14 at 18:05 answered Jun 4 '14 at 17:44 Sjoerd C. de Vries 51.4k10131256 I downloaded it here library.wolfram.com/infocenter/MathSource/6747 and did as you said. When I evaluate the notebook it says installation failed! Does not seem to work with Mathematica 9 + Windows 8 ( probably has nothing to do with windows 8). –neverender Jun 4 '14 at 17:59 @neverender What do you mean by evaluate the notebook? Did you do anything other than using Get (<<)? I do have Mathematica 9 be it on Win7. –Sjoerd C. de Vries Jun 4 '14 at 18:07 had to give the the installer file administrative rights, my bad. thank you very much! –neverender Jun 4 '14 at 18:16 @neverender Just moving the .m fil