add a smoothed line to barplot with ggplot

I was wondering whether it is possible to add a geom_smooth (or any trend-line) to a geom_col barplot in ggplot2. Here is the code I’m using: library(dplyr) library(readxl) library(ggplot2) library(RColorBrewer) mapQ_prop <- read_excel("/path/to.file.xlsm", 16) mapQ_prop <- mapQ_prop %>% arrange(value) mapQ_prop$sample <- as.vector(mapQ_prop$sample) mapQ_prop$sample = factor(mapQ_prop$sample,mapQ_prop$sample) plot_mapQ <- ggplot(data=mapQ_prop, aes(x=sample, y=value, fill=brewer.pal(9, "Blues")[5])) + geom_col(color="black", alpha=.75)… Read More add a smoothed line to barplot with ggplot

continuous legend in ggplot2 and smooth contour lines

I am handling this data: dput(data.mi10) structure(list(Days = c(0, 40.5555555555556, 81.1111111111111, 121.666666666667, 162.222222222222, 202.777777777778, 243.333333333333, 283.888888888889, 324.444444444444, 365, 0, 40.5555555555556, 81.1111111111111, 121.666666666667, 162.222222222222, 202.777777777778, 243.333333333333, 283.888888888889, 324.444444444444, 365, 0, 40.5555555555556, 81.1111111111111, 121.666666666667, 162.222222222222, 202.777777777778, 243.333333333333, 283.888888888889, 324.444444444444, 365, 0, 40.5555555555556, 81.1111111111111, 121.666666666667, 162.222222222222, 202.777777777778, 243.333333333333, 283.888888888889, 324.444444444444, 365, 0, 40.5555555555556, 81.1111111111111, 121.666666666667, 162.222222222222, 202.777777777778, 243.333333333333,… Read More continuous legend in ggplot2 and smooth contour lines