How to plot error bars in a logarithmic (base 10) plot

조회 수: 57 (최근 30일)
Alessandro Biasioli
Alessandro Biasioli 2022년 5월 17일
답변: Sailesh Kalyanapu 2022년 5월 20일
Hi all,
I was trying to print horizontal and vertical error bars using logarithmic axis. I didn't managed to do so with the loglog command, and instead with those 2 commands it prints errorbars in a log scale but in natural log. So how can I print the same error bars in a 10 base log? I can't find if I can insert something else in the set command to print it right... Thank in advance!
errorbar(X_data, Y_data, ypos, yneg, xpos, yneg)
set(gca, 'XScale','log', 'YScale','log')

답변 (1개)

Sailesh Kalyanapu
Sailesh Kalyanapu 2022년 5월 20일
It seems that the input arguments are being passed incorrectly in the ‘errorbars’ plot function.
>> errorbar(x,y,yneg,ypos,xneg,xpos)
The ‘loglog’ function plots x- and y-coordinates using a base-10 logarithmic scale on the x-axis and the y-axis.
For more information on errorbar and ‘loglog’, please refer to the below links to their respective documentations:
You can also refer to this MATLAB Answers post for plotting error bars in a logarithmic (base 10) plot :

카테고리

Help CenterFile Exchange에서 Errorbars에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by