Closed oalavijeh closed 1 year ago
Assuming you're trying to format the output of effect_plot()
, you will need to use ggplot2
's tools for doing this. Here's an example:
library(jtools)
library(ggplot2)
fit <- lm(Income ~ Frost + Illiteracy + Murder, data = as.data.frame(state.x77))
effect_plot(fit, Frost) +
scale_y_continuous(labels = scales::percent)
The example above is a little nonsensical since the y-axis shouldn't be a percentage, but you get the idea. The main point is if you add the + scale_y_continuous(labels = scales::percent)
, you'll get the y-axis labels expressed as percentages.
Many thanks
Thanks for the amazing tool!
Is it possible to change the units of the x-axis. I am plotting the results of a GLM and the prevalence of a disease in a case/control cohort. The y-axis is 0.010-0.020 but I would like to output it as 0-2%. Is that possible?
Many thanks