[R] Plot a legend outside of the plotting area in base graphics?
As the title says: How can I plot a legend outside the plotting area when using base graphics?
I thought about fiddling around with
layout and produce an empty plot to only contain the legend, but I would be interested in a way using just the base graph facilities and e.g.,
par(mar = ) to get some space on the right of the plot for the legend.
Here an example:
But as said, I would like the legend to be outside the plotting area (e.g., to the right of the graph/plot.