I would like to jitter the text on a plot so as to avoid overplotting. To do so, I assume that I need a bounding box around the text component. Is there a way to get this?
For example, in base graphics:
plot.new()
text(.5,.5,"word")
text(.6,.5,"word") #does this overlap?
In grid there is a way to drop overlapping text, but I can't seem to find a way to access the code that figures out if overlapping has occurred.
grid.text(c("word","other word"),c(.5,.6),c(.5,.5),check=T)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…