Hello, I have an issue when trying to change the interval between the x-axis ticks in a ggline() lineplot.
Both the ggplot() scale_x_continous() function and the ggpar() yticks.by= lead to the error
"Discrete value supplied to continuous scale"
even though both x any are numeric.
library(ggpubr)
library(ggplot2)
df <- ToothGrowth
p <- ggline(df3, x = "dose", y = "len", color = "supp",
add = c("mean_se"),
yticks.by = 12
)+
scale_x_continuous(breaks = get_breaks(by = 2, from = 0))
p
I can bypass the error using ggplot() and geom_line but I would prefer to stay in the ggpubr environment.
Hello, I have an issue when trying to change the interval between the x-axis ticks in a ggline() lineplot. Both the ggplot() scale_x_continous() function and the ggpar() yticks.by= lead to the error "Discrete value supplied to continuous scale" even though both x any are numeric.
library(ggpubr) library(ggplot2) df <- ToothGrowth p <- ggline(df3, x = "dose", y = "len", color = "supp", add = c("mean_se"),
yticks.by = 12
scale_x_continuous(breaks = get_breaks(by = 2, from = 0)) p
I can bypass the error using ggplot() and geom_line but I would prefer to stay in the ggpubr environment.
Thanks in advance for any advice!