I’d like to include the glyph used in a scatter plot directly in a text annotation.
E.g., Suppose I have:
g <- g + geom_text(aes(x=14, y = 17, label="GOOD"))
where g is a scatter plot w/ a linear trend line, labeled by “GOOD” at (14,17). Instead of
“GOOD”, I’d like to have “X = GOOD” where X is a plotting glyph (e.g., a hollow triangle, circle etc.) used in the scatter plot. This way I can dispense w/ the legend.
You could probably do it by plotting a single point of the right type using
annotate(), with the text you have above next to it as a separateannotate().Personally, though, it sounds like you’re trying to make what they used to call a camera-ready image. In that case, I’d recommend exporting to PDF and using something like Inkspace to custom-create your in-graph labels. It’ll be simpler and you have a lot more flexibility, plus a WYSIWYG interface.