【发布时间】:2020-02-10 18:17:26
【问题描述】:
我想在带有极坐标的绘图的左下角放置注释。
有没有办法通过使用不属于圆形坐标系的坐标(如图所示,这不允许我将它们放置在很远的地方)而是使用普通的 x 和 y 系统?
我不需要显示坐标轴,但我将它们留在里面以帮助显示正在发生的事情。
library(tidyverse)
iris2 <- iris %>%
mutate(id = row_number())
ggplot(iris2) +
theme_minimal() +
theme(
legend.position = "none",
axis.title = element_blank()
) +
coord_polar() +
geom_segment(aes(x = id, xend = id,
y = 10,
yend = 10 + Sepal.Length),
size = 1, inherit.aes = FALSE) +
annotate(geom="text", x = 90, y = 10, label="Annotation",
color="Red") +
annotate(geom="text", x = 90, y = 15, label="Annotation",
color="Blue")
【问题讨论】:
-
见cowplot。