recently a new theme argument was introduced into ggplot which allows to align the title, subtitle and caption with the plot's (and not the panels) outer margin: plot.title.position="plot" etc.
Is there any way how to move also the legend to e.g. the very left (as in my example below)? Many thanks!
The most difficult part of R is finding the right question, and here is no exception. And, it also demonstrates the importance of reprex. The code originally posted throws an error
Error in (function (el, elname) :
"plot.title.position" is not a valid theme element name.
and it doesn't produce the screenshot, which now looks like something edited outside ggplot.
So, let's go back to the point where we have the plot in the viewport as shown in my answer, and think about what you are trying to do in terms of how to get from there to the point where you're moving the title, subtitle and legend out of the viewport (sort of like typing in the margins in word processing).
Can you post a reprex to show how you're trying to plot anything outside the viewport?
The OP hasn't said it explicitly but you can infer from the context that it is using the development version of ggplot2 so it actually is a reprex and it does produce the shown output, so for your peace of mind, here is the reprex created with reprex package to prove it