I am using survival analysis to show the proportion of individuals/duration to reach a developmental milestone, and I would like to flip the y-axis ticks so it has 0 at the top and 1.00 at the bottom. I tried using scale_y_reverse, but this flipped the results too. I just want the axis ticks to go from 0-1, while maintaining the visuals of the first graph. Thanks for your help!!
ggsurvplot(spin_fit, data = spin.data, pval = TRUE, conf.int = TRUE)
ggplot2 <- ggsurvplot(spin_fit, data = spin.data, pval = TRUE)$plot
df1 <- data.frame(time=spin_fit$time, nRisk=spin_fit$n.risk, nRiskRel=spin_fit$n.risk/max(spin_fit$n.risk))
ggplot2 + geom_point(aes(x=time, y=nRiskRel), data = df1, alpha=0.5, size=3)
ggplot2 + ylab("Proportion of Larvae Spinning Cocoon") ]
Here's what happened when I added to the last line:
ggplot2 + ylab("Proportion of Larvae Spinning Cocoon") + scale_y_reverse()