Removing lower marker in error plot
Ältere Kommentare anzeigen
Hi,
I am trying to plot one sided error plot. Here is the sample code and output. I want to remove the markers circled in red. Can someone please help me with this?
x = 1:10;
X1=rand(13,10);
y = mean(X1);
U= std(X1);
L=zeros(size(y));
errorbar(x,y,L,U,'--k','LineWidth',2)
Antworten (3)
the cyclist
am 28 Dez. 2016
errorbar(x,y,[],U,'--k','LineWidth',2)
2 Kommentare
Sowmya MR
am 28 Dez. 2016
the cyclist
am 28 Dez. 2016
I'm guessing that you have an older version of MATLAB that does not support this syntax. I've posted another solution that might work.
the cyclist
am 28 Dez. 2016
errorbar(x,y,nan(size(x)),U,'--k','LineWidth',2)
1 Kommentar
Sowmya MR
am 28 Dez. 2016
the cyclist
am 28 Dez. 2016
Bearbeitet: the cyclist
am 28 Dez. 2016
This solution will not work on newer versions of MATLAB, but I wonder if making the lower error bar in the "wrong" direction will make it overlap the upper one.
I'm not sure which sign makes sense, so try either
errorbar(x,y,U,U,'--k','LineWidth',2)
or
errorbar(x,y,-U,U,'--k','LineWidth',2)
Kategorien
Mehr zu Annotations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!