Color of Kaplan meiern with ecdf function

1 vue (au cours des 30 derniers jours)
Changoleon
Changoleon le 22 Déc 2017
Commenté : Star Strider le 5 Mai 2020
Hello,
How can I change the color of plots that are made with ecdf?
ecdf(days,'frequency',s_xrt,'function','survivor');

Réponse acceptée

Star Strider
Star Strider le 22 Déc 2017
You cannot. Instead, ask for the outputs and plot the data yourself.
Example
rng default % for reproducibility
failuretime = random('birnbaumsaunders',0.3,1,100,1);T = 0.9;
cens = (failuretime>T);
[f,x,flo,fup] = ecdf(failuretime,'function','cumulative hazard',...
'censoring',cens,'bounds','on');
figure(1)
stairs(x, f, '-r')
hold on
stairs(x, flo, ':g', 'LineWidth',1)
stairs(x, fup, ':g', 'LineWidth',1)
hold off
xlabel('x')
ylabel('H(x)')
grid
Experiment to get the result you want.
  4 commentaires
Isabella Osetinsky-Tzidaki
Great!
Star Strider
Star Strider le 5 Mai 2020
Thank you!
A Vote would be appreciated!
.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by