Plot a legend outside of the plotting area in base graphics?
No one has mentioned using negative inset values for legend. Here is an example, where the legend is to the right of the plot, aligned to the top (using keyword “topright”). # Random data to plot: A <- data.frame(x=rnorm(100, 20, 2), y=rnorm(100, 20, 2)) B <- data.frame(x=rnorm(100, 21, 1), y=rnorm(100, 21, 1)) # Add extra … Read more