Bar Plots with errorbars with limits
Ältere Kommentare anzeigen
I am tring to draw a bar plot where my highest value on y-axis is 1. Then I want to draw errorbars(standard error of the mean) for each bar. But while doing so, for my highest bar, the errorbar is crossing my highest limit 1. How can I limit my errorbars for my plot. Thank you.
2 Kommentare
the cyclist
am 10 Feb. 2020
Can you post an example of what you mean? If I run the code
figure
errorbar(0:0.1:1,(0:0.1:1)/10)
ylim([0 1])
then the figure I get is

The error bars are automatically cut off at the top.
Sansit Das
am 10 Feb. 2020
Akzeptierte Antwort
Weitere Antworten (1)
Marta G
am 10 Feb. 2020
0 Stimmen
Hello,
I am not sure if I understand your problem. You might get what you want if you work with the command ylim.
With your figure, you might get the same result if you use ylim([0 1]). You can slightly increase the upper limit and see if that solves your problem. If you want to this on a loop i would suggest adding a variable for this upperlimit.
Hope this helps!
Kategorien
Mehr zu Errorbars finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

