Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To enlarge the text size of the plot in ggcuminc, you can add the "theme" function and adjust the "axis.text" and "axis.title" arguments. For example:

library(ggplot2)
library(ggcuminc)

# create data
df <- data.frame(x = rpois(100, 5), y = rpois(100, 5))

# plot cumulative incidence
ggcuminc(df, "x", "y")

# enlarge text size
ggcuminc(df, "x", "y") +
  theme(axis.text = element_text(size = 12),
        axis.title = element_text(size = 14))

In the above example, we added the "theme" function and adjusted the text size of the x and y axis labels using the "axis.title" argument and the text size of the tick labels using the "axis.text" argument. You can adjust the size to your preferred value.