Put 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 logarithmic error bars Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Ask Answer Browse More
Logarithmic Error Propagation
Contributors Recent Activity Flagged Content Flagged as Spam Help MATLAB Central Community Home MATLAB Answers File error bars on log scale excel Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Ask Answer Browse More Contributors Recent Activity Flagged Content Flagged as Spam Help Trial software MathWorks Support Team
Error Bars On Log Graphs
(view profile) 13,654 questions 13,654 answers 13,653 accepted answers Reputation: 2,647 Vote0 How can I use the ERRORBAR function with a logarithmic axis in MATLAB? Asked by MathWorks Support Team MathWorks Support Team (view profile) 13,654 questions 13,654 answers 13,653 accepted answers Reputation: 2,647 on 27 Jun 2009 Latest activity Commented on by Ohad BarSimanTov logarithmic error calculation Ohad BarSimanTov (view profile) 0 questions 0 answers 0 accepted answers Reputation: 0 on 27 Jul 2016 Accepted Answer by MathWorks Support Team MathWorks Support Team (view profile) 13,654 questions 13,654 answers 13,653 accepted answers Reputation: 2,647 336 views (last 30 days) 336 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');
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
Errorbarlogx
company Business Learn more about hiring developers or posting ads with us Mathematica Questions
Standard Error Of Log Transformed Data
Tags Users Badges Unanswered Ask Question _ Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join error propagation log base 10 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 Plotting Error Bars on a https://www.mathworks.com/matlabcentral/answers/99844-how-can-i-use-the-errorbar-function-with-a-logarithmic-axis-in-matlab Log Scale up vote 30 down vote favorite 15 I have a plot with ErrorListPlot data = Sort@RandomReal[1, {10, 2}]; error = RandomReal[0.5, 10]; errorplot = ErrorListPlot[ Partition[Riffle[data, ErrorBar /@ error], 2], Joined -> True] However, I would like to have it with the y-axis on a log scale. I can use ListLogPlot to get the log scale but this doesn't plot the errorbars. logplot = ListLogPlot[ data, PlotRange -> All, AxesOrigin http://mathematica.stackexchange.com/questions/3897/plotting-error-bars-on-a-log-scale -> {0, 0}, Joined -> True ] I tried Show[logplot, errorplot, PlotRange->All] to see if it would plot with the scale and ticks from the logplot but that didn't work right: I also tried to take the Ticks from the logplot: Show[errorplot, Ticks -> Ticks /. AbsoluteOptions@logplot] but that just gives an error. I tried to manually take the log of the data and then grab the tick-marks but that didn't work right data = Sort@RandomReal[{10, 100}, {10, 2}]; error = RandomReal[20, 10]; logdata = Transpose[{data[[All, 1]], Log[10, data[[All, 2]]]}]; errorup = Log[10, data[[All, 2]] + error] - logdata[[All, 2]]; errordown = Log[10, data[[All, 2]] - error] - logdata[[All, 2]]; logerror = Log[10, error]; logplot = ListLogPlot[ data, Joined -> True, AxesOrigin -> {0, 0} ] errorlogplot = ErrorListPlot[ Partition[ Riffle[logdata, ErrorBar /@ Transpose[{errordown, errorup}]], 2], Joined -> True, AxesOrigin -> {0, 0} ] errorlogplot2 = ErrorListPlot[ Partition[ Riffle[logdata, ErrorBar /@ Transpose[{errordown, errorup}]], 2], Joined -> True, AxesOrigin -> {0, 0}, Ticks -> (Ticks /. AbsoluteOptions@logplot) ] Is there an easy way to do this? On the log scale the error bars will appear asymmetrical. graphics plotting share|improve this question edited Apr 4 '12 at 5:48 Vitaliy Kaurov 47.6k6133237 asked Apr 4 '12 at 3:20 s0rce 6,06622465 Have you tried LevelScheme?
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 http://mathematica.stackexchange.com/questions/56197/errorlistlogplot-gives-wrong-error-bars-on-log-scale 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 ErrorListLogPlot gives wrong error bars on log scale up vote 5 down vote favorite From this and this post I learned how to use ErrorListLogPlot and its family error bars to add error bars on top of a list of mean values. However, consider this simple example: Needs["ErrorBarLogPlots`"] ErrorListLogPlot[{{1, 0.6}, {2, 0.5}, {3, 1.5}}, Joined -> True, PlotRange -> {{0, 4}, {0.1, 5}}, GridLines -> {{}, {0.4, 1.5, 1.6, 2.5, 4.5}}] where {1, 2, 3} are mean values and {0.6, 0.5, 1.5} are the associated standard errors. I added GridLines to indicate the positions where the end points of error bars are supposed to be located. It is clear from the plot above error bars on that the gridlines and end points do not intersect (on Mathematica 9), so the error bars must be wrong. I wonder whether something can be fixed in the ErrorBarLogPlots package. Note that the following examples, including built-in ErrorListPlot, give correct error bars (either on linear or log scale): ErrorListPlot[{{1, 0.6}, {2, 0.5}, {3, 1.5}}, Joined -> True, PlotRange -> {{0, 4}, {0.1, 5}}, GridLines -> {{}, {0.4, 1.5, 1.6, 2.5, 4.5}}] ListPlot[{{1, 2, 3}, {0.4, 1.5, 1.5}, {1.6, 2.5, 4.5}}, Joined -> {False, True, True}, PlotRange -> {{0, 4}, {0.1, 5}}, GridLines -> {{}, {0.4, 1.5, 1.6, 2.5, 4.5}}, Filling -> {2 -> {3}}] ListLogPlot[{{1, 2, 3}, {0.4, 1.5, 1.5}, {1.6, 2.5, 4.5}}, Joined -> {False, True, True}, PlotRange -> {{0, 4}, {0.1, 5}}, GridLines -> {{}, {0.4, 1.5, 1.6, 2.5, 4.5}}, Filling -> {2 -> {3}}] plotting bugs logarithmic-scale share|improve this question edited Jul 31 '14 at 18:08 asked Jul 30 '14 at 3:32 Leo Fang 484411 You might want to look in the /usr/local/Wolfram/Mathematica/9.0/AddOns/Packages/ directory for the related Package. –Öska Jul 30 '14 at 9:09 @Öska, I don't understand. What should I look for? –Leo Fang Jul 30 '14 at 17:12 1 @Öska To be honest, your suggestion to modify the package .m file is the same as re-implementing this functionality because it is not so simple to fix bugs in the code you are not familiar with. –Alexey Popkov Jul 31 '14 at 19:34 1 From my
be down. Please try the request again. Your cache administrator is webmaster. Generated Mon, 24 Oct 2016 21:34:48 GMT by s_wx1062 (squid/3.5.20)