Using pch Characters in grid.text
I have created a graph using ggplot2. Now I want to have t开发者_开发百科he legend not onto the graph but in the grid outside the graph.
My question is now if someone knows if there is a possibility to use the pch symbols in grid.text?
Here is an image to show what I want ;)
Best regards
I don't know if we can directly use points in text, but you can combine grid.text and grid.points:
grid.points(x=rep(0.1,9),y=1:9/10,pch=1:10,default.units="npc")
grid.text(x=rep(0.2,9),y=1:9/10,label=letters[1:9],default.units="npc")
精彩评论