library(smplot2)
library(ggplot2)
ggplot(data = mtcars, mapping = aes(x = drat, y = mpg)) +
geom_point(
shape = 21, fill = "#0f993d", color = "white",
size = 3
) -> p1
ggplot(data = mtcars, mapping = aes(x = drat, y = mpg)) +
geom_point(shape = 21, fill = "#0f993d", color = "white", size = 3) +
sm_hvgrid() -> p2
combined_fig <- sm_put_together(list(p1, p2), ncol = 2, nrow = 1)
combined_fig + sm_add_text(label = "My label", x = .5, y = .5)
Run the code above in your browser using DataLab