Color of Kaplan meiern with ecdf function

조회 수: 1 (최근 30일)
Changoleon
Changoleon 2017년 12월 22일
댓글: Star Strider 2020년 5월 5일
Hello,
How can I change the color of plots that are made with ecdf?
ecdf(days,'frequency',s_xrt,'function','survivor');

채택된 답변

Star Strider
Star Strider 2017년 12월 22일
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
Isabella Osetinsky-Tzidaki
Isabella Osetinsky-Tzidaki 2020년 5월 5일
Great!
Star Strider
Star Strider 2020년 5월 5일
Thank you!
A Vote would be appreciated!
.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by