You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 plotp<-
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 plotp<-
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)
The text was updated successfully, but these errors were encountered:
I'm not sure if this would be all that feasible to support. We pull the title/subtitle grob out of the built scatter plot (see getTitleGrobs()). If the built scatter plot doesn't include modifications to the title/subtitle that come from theme() (e.g., plot.title.position), there wouldn't be an easy way for us to include those modifications. I suppose we could check for modifications such as alignment by inspecting the theme of the built scatter plot and applying those changes to the title/subtitle grob in a piecemeal way (i.e., one by one), but that would be kinda a pain.
The latest (
3.3.0
) release ofggplot2
introduced a way to align the plot titles with the plot:But this alignment is removed by
ggExtra
:The text was updated successfully, but these errors were encountered: