Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 ggplot2 创建了一个图表。现在我想让图例不在图表上,而是在图表外的网格中。
我现在的问题是,如果有人知道是否有可能在 grid.text 中使用 pch 符号?
这是一张显示我想要的图片;)
最好的祝福
我不知道我们是否可以直接在文本中使用点,但是您可以将grid.text和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")