R: printing multiple plots side-by-side
Do you wanna print multiple plot side by side?
This page is about:
What you will get is something like this
Plot a series of scatter plots (don't have to be though)
Then, print them side-by side
https://gyazo.com/058f945dba8a2cd15b680f1d19aec400
Code here.
code::R
library(gridExtra)
library(ggplot)
dobj <- ggplot(wide_data, aes(x = v_dobj_MI_smk, y = v_dobj_MI_ptj)) +
geom_point(color = "#CC79A7") +
labs(x = "SMK", y = "PTJ", title = "Dobj")
amod <- ggplot(wide_data, aes(x = n_amod_MI_smk, y = n_amod_MI_ptj)) +
geom_point(color = "#56B4E9") +
labs(x = "SMK", y = "PTJ", title = "Amod")
bg_dp <- ggplot(wide_data, aes(x = lemm_bg_deltap_strgst_gm_smk, y = lemm_bg_deltap_strgst_gm_ptj)) +
geom_point( color = "#009E73") +
labs(x = "SMK", y = "PTJ", title = "Bigrams")
##I have created three sepatate plots, ##Then, I will arrange them in a single display grid.arrange(dobj, amod, bg_dp, ncol=3)
package used