Comments (6)
@kassambara I've received such user experience
from survminer.
Hi,
Linetypes can be changed by strata as follow:
# Fit sur vival curves
library(survival)
lung$fake_groups <- sample(1:6, size = nrow(lung), replace = TRUE)
fit<- survfit(Surv(time, status) ~ fake_groups, data = lung)
# Visualize and change linetypes by strata
library(survminer)
ggsurvplot(fit, linetype = "strata")
# Change linetypes manually
ggsurv <- ggsurvplot(fit, linetype = "strata")
ggsurv$plot <- ggsurv$plot + scale_linetype_manual(values = c(1,1,2,1,2,2))
print(ggsurv)
Should we add a new argument "linetype.manual = c(1,1,2,1,2,2)" in ggsurvplot()?
Best,
A.
from survminer.
It's always easier than modyfing ggsurvplot$plot :)
2016-05-30 16:49 GMT+02:00 Alboukadel KASSAMBARA [email protected]:
Hi,
Linetypes can be changed by strata as follow:
Fit sur vival curves
library(survival)lung$fake_groups <- sample(1:6, size = nrow(lung), replace = TRUE)fit<- survfit(Surv(time, status) ~ fake_groups, data = lung)
Visualize and change linetypes by strata
library(survminer)
ggsurvplot(fit, linetype = "strata")[image: rplot]
https://cloud.githubusercontent.com/assets/3313355/15652320/b720e3ce-2685-11e6-93fc-b4586b76ebaa.pngChange linetypes manuallyggsurv <- ggsurvplot(fit, linetype = "strata")ggsurv$plot <- ggsurv$plot + scale_linetype_manual(values = c(1,1,2,1,2,2))
print(ggsurv)
[image: rplot13]
https://cloud.githubusercontent.com/assets/3313355/15652401/3a8c7ef8-2686-11e6-8c4c-d59768088510.pngShould we add a new argument "linetype.manual = c(1,1,2,1,2,2)" in
ggsurvplot()?Best,
A.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#45 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AGdaztldnibQ2KitZGgFqk4VXZvxEddyks5qGvkJgaJpZM4Ip1yF
.
from survminer.
The function 'ggsurvplot()' has now a new argument linetype.
Allowed values includes i) "strata" for changing linetypes by strata (i.e. groups); ii) a numeric vector (e.g., c(1, 2)) or a character vector c("solid", "dashed").
from survminer.
from survminer.
After you'll update NEWS.md you can close this issue
from survminer.
Related Issues (20)
- how to retain the confidence interval in plot when try to transform it to plotly object
- `ggsurvplot_facet()` says it supports numeric/text input to `pval` argument, but it doesn't.
- Deprecated functions HOT 1
- ggsurvplot displaying error
- Log Likelihood Ratio P-value incorrectly named as log-rank?
- Number at risk and number censored in the same table using ggsurvplot_combine
- Changing size of "large dash". HOT 1
- surv.median.line triggers warnings in ggplot2 3.5.0 HOT 2
- `surv_fit` doesn't support `weights` parameter
- deprecated feature in survminer
- ggsurvplot gives error when drawing risk table. HOT 3
- pariwise_survdiff throws unusual error when a model with strata is used
- misalignment between the chart and the risk table in ggsurvplot HOT 6
- ggflexsurvplot risk table strata
- `select_()` was deprecated in dplyr 0.7.0. error HOT 3
- Default to mitre linejoin when plotting step functions
- ggforest fails if data is supplied as tibble.
- ggsurvplot does not plot every event
- `gather_()` was deprecated in tidyr 1.2.0. HOT 1
- `as.tibble()` was deprecated in tibble 2.0.0.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from survminer.