r-lemon

Different x and y axis scales in multifaceted scatter ggplot2

谁都会走 提交于 2021-02-17 06:46:20
问题 I have used lemon package with ggplot2 for plotting multifaceted scatter plot with regression and confidence interval line using the following code library(tidyverse) library(lemon) #Plotting ggplot(data_calibration, aes(Observed,Predicted))+ geom_point(color="black",alpha = 1/3) + facet_rep_grid(Station ~ Method, scales="free", repeat.tick.labels = "all")+ xlab("Measured") + ylab("Predicted")+ theme_bw()+ geom_smooth(method="lm") I want to have both x and y-axis scales to be free. But I am

Add a common legend

旧城冷巷雨未停 提交于 2020-01-23 12:17:53
问题 I was trying to do a multiplot with ggplot2 . This was my initial code nucmer_s1 <- ggarrange(eight_uniform, ten_uniform, twelve_uniform, fourteen_uniform, sixteen_uniform, ncol=3, nrow=2, common.legend = TRUE, legend="bottom") getting this error Error in plot$scales : $ operator is invalid for atomic vectors then. annotate_figure(nucmer_s1, top = text_grob("Genomas validados con distribución de datos equilibrada", color = "black", face = "bold", size = 12)) however I obtain the graphic But I

Add a common legend

筅森魡賤 提交于 2019-12-06 12:32:13
I was trying to do a multiplot with ggplot2 . This was my initial code nucmer_s1 <- ggarrange(eight_uniform, ten_uniform, twelve_uniform, fourteen_uniform, sixteen_uniform, ncol=3, nrow=2, common.legend = TRUE, legend="bottom") getting this error Error in plot$scales : $ operator is invalid for atomic vectors then. annotate_figure(nucmer_s1, top = text_grob("Genomas validados con distribución de datos equilibrada", color = "black", face = "bold", size = 12)) however I obtain the graphic But I need to put a title in the each plot a title so I changed to this one nucmer_s1 <-grid.arrange( eight