Open stefaneng opened 2 years ago
Better workaround:
library(BoutrosLab.plotting.general);
mtcars.scatter <- create.scatterplot(
mpg ~ wt,
data = mtcars,
text.x = 1,
text.y = c(5, 40),
top.padding = 5,
text.label = c('Text shows', 'Text now shows'),
add.text = TRUE
);
mtcars.scatter$par.settings$clip <- list(panel = FALSE);
mtcars.scatter;
It would be nice to be able to draw text outside of the panel as BPG removes points/text outside of the limits. I included a workaround in BPG using multipanel plot to add text in the margin. Base R solution is included as well.
This is easy enough to do in base R with mtext.
Created on 2022-06-10 by the reprex package (v2.0.1)