Does anybody know, how do I change the plot titles (annotated by the red arrow) to be horizontal in the following ggplot? And how do I move them to the left-hand side instead of having them on the right?
My code is as follows:
coord_cartesian(ylim=c(min(mdf["value"]), max(mdf["value"])))
theme(axis.text.y=element_blank(),
axis.ticks.y=element_blank())
xlab("Time (s)")
ylab("Channel signals")
geom_line()
facet_grid(variable ~ .)
Thank you!!
CodePudding user response:
To change the side, use
facet_grid(variable ~ ., switch = "y")
To rotate the labels, add the following to theme
:
strip.text.y.left = element_text(angle = 0)