Borrar filtros
Borrar filtros

Plotting Poissonian Error Bars

5 visualizaciones (últimos 30 días)
jgillis16
jgillis16 el 18 de Ag. de 2015
Comentada: Star Strider el 19 de Ag. de 2015
I am inputting poissonian error bars on a plot I drafted. The only problem is that there are numerous points on the graph, therefore numerous associated error bars. This makes the graph look messy as well as unreadable. Would there be anyway to extrapolate the vertical distance each bar has from the line of the plot itself and plot the two vertical extremes of the error bars as separate 'curves' on the plot instead of individual error bars?
Code is below:
YYYYA = sort(YYYY, 'ascend');
S = sqrt(YYYYA);
figure(9)
plot(XX2, YYYYA, errorbar(XX2,YYYYA,S))

Respuesta aceptada

Star Strider
Star Strider el 18 de Ag. de 2015
I’m not sure what ‘S’ is, but I assume it is one extreme of your symmetric error limits. To plot error _bands) above and below your principal plot, use the hold function:
figure(9)
plot(XX2, YYYYA) % Data
hold on
plot(XX2, YYYYA+S) % Upper Error Band
plot(XX2, YYYYA-S) % Lower Error Band
hold off
This is obviously untested code.
  2 comentarios
jgillis16
jgillis16 el 19 de Ag. de 2015
Such a simple solution. Thanks again Strider!
Star Strider
Star Strider el 19 de Ag. de 2015
My pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by