기본 콘텐츠로 건너뛰기

라벨이 2.9 Step Plot인 게시물 표시

2.9 Step Plot

9. step plot geom_step() 은 이후에 그릴 line 그래프와 매우 비슷한 그래프입니다. 특히 생존시간에 따른 Hazard Ratio를 표현하기 매우 좋습니다. xxxxxxxxxx Hazard_Ratio = c ( 0.1 , 0.3 , 0.4 , 0.45 , 0.49 , 0.52 , 0.6 , 0.65 , 0.75 , 0.8 , 0.95 ) Survival_Time = c ( 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 ) ​ ggplot ( NULL ) +   geom_step ( aes ( x = Survival_Time , y = Hazard_Ratio ), col = 'red' ) +   scale_x_continuous ( breaks = Survival_Time ) +   theme_classic ()