-
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
Description
The latest (3.3.0) release of ggplot2 introduced a way to align the plot titles with the plot:
# setup
set.seed(123)
library(ggplot2)
library(ggExtra)
# basic plot
p <-
ggplot(mtcars, aes(wt, mpg)) + geom_point() +
labs(title = "this title is aligned with the plot and not the axis") +
theme(plot.title.position = "plot")
# title aligned with the plot
plot(p)But this alignment is removed by ggExtra:
# setup
set.seed(123)
library(ggplot2)
library(ggExtra)
# basic plot
p <-
ggplot(mtcars, aes(wt, mpg)) + geom_point() +
labs(title = "this title is aligned with the plot and not the axis") +
theme(plot.title.position = "plot")
# alignment removed
ggMarginal(p)mattmotyl

