Azzera filtri
Azzera filtri

Plotting Poissonian Error Bars

5 visualizzazioni (ultimi 30 giorni)
jgillis16
jgillis16 il 18 Ago 2015
Commentato: Star Strider il 19 Ago 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))

Risposta accettata

Star Strider
Star Strider il 18 Ago 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 Commenti
jgillis16
jgillis16 il 19 Ago 2015
Such a simple solution. Thanks again Strider!
Star Strider
Star Strider il 19 Ago 2015
My pleasure!

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by