Skip to content

Commit 427f8cd

Browse files
committed
add colnames and change size to linewidth
1 parent d001be1 commit 427f8cd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

R/visualization.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ plot_trace_PSM <- function(time, partsurv.model, PA=F, v_names_states) {
113113
plot_trace <- function(m_M) {
114114
df_M <- data.frame(Cycle = 0:n_cycles, m_M, check.names = F)
115115

116+
v_names_states <- colnames(m_M)
116117
#df_M_long <- tidyr::gather(df_M, key = `Health State`, value, 2:ncol(df_M))
117118

118119
df_M_long <- tidyr::pivot_longer(df_M, cols = -Cycle,
@@ -123,14 +124,14 @@ plot_trace <- function(m_M) {
123124

124125
gg_trace <- ggplot2::ggplot(df_M_long, aes(x = Cycle, y = value,
125126
color = `Health State`, linetype = `Health State`)) +
126-
ggplot2::geom_line(size = 1) +
127+
ggplot2::geom_line(linewidth = 1) +
127128
ggplot2::xlab("Cycle") +
128129
ggplot2::ylab("Proportion of the cohort") +
129130
ggplot2::scale_x_continuous(breaks = number_ticks(8)) +
130131
ggplot2::theme_bw(base_size = 14) +
131132
ggplot2::theme(legend.position = "bottom",
132133
legend.background = element_rect(fill = NA))
133-
134+
browser()
134135
return(gg_trace)
135136
}
136137

0 commit comments

Comments
 (0)