Errorbar plot has no connecting lines

9 visualizaciones (últimos 30 días)
fireattack
fireattack el 19 de Sept. de 2016
Editada: fireattack el 23 de Sept. de 2016
I just used the example from doc,
x = 1:10:100;
y = [20 30 45 40 60 65 80 75 95 90];
err = 8*ones(size(y));
errorbar(x,y,err)
However, the figure has no connecting lines, unlike the documentation:
  1 comentario
Star Strider
Star Strider el 19 de Sept. de 2016
What version of the documentation did you use? The current online documentation is for R2016b, and that code works correctly for me (connects the centres of the bars with a line, and plotting the error bars) in R2016b.
Type:
doc errorbar
in your Command Window to get the documentation for your version. There could be version differences.

Iniciar sesión para comentar.

Respuesta aceptada

fireattack
fireattack el 23 de Sept. de 2016
It is fixed in R2016b.

Más respuestas (1)

mbonus
mbonus el 19 de Sept. de 2016
errorbar(x,y,err,'-b')
  4 comentarios
mbonus
mbonus el 19 de Sept. de 2016
Editada: mbonus el 19 de Sept. de 2016
Or after you plot it you could try
set(gca,'linestyle','--')
fireattack
fireattack el 23 de Sept. de 2016
Editada: fireattack el 23 de Sept. de 2016
thanks for the following up. I can't reproduce my original problem on another computer, so I guess something was wrong with my setup. Luckily after updating my Matlab to 2016b it fixed itself.

Iniciar sesión para comentar.

Categorías

Más información sobre Errorbars en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by