michaelway / ggkm

Kaplan-Meier plots with at risk table below
MIT License
7 stars 5 forks source link

Changing the legend order #6

Closed beginner984 closed 3 years ago

beginner984 commented 3 years ago

Hello

I have this plot

By this code

> ggkm(fit, table = T, 
+      main="Survival  by Tumour Regression Grading (TRG)", 
+      ystratalabs = c("TRG4-5", "TRG1-2"),
+      ystrataname = "TRG",
+      xlabs = "Months after surgery",
+      dashed=FALSE,
+      pval=TRUE,
+      ci=TRUE)
>

How I change the order around of the legend, so that TRG1-2 comes first?