geom_label()在 ggplot2 中使用,是否可以使矩形完全為正方形而不是圓角?
data(iris)
ggplot(iris, aes(Sepal.Width, Sepal.Length)) geom_point()
geom_label(x=4, y=7, label = "Test label")
我想將測驗標簽周圍的圓角矩形對齊。
謝謝。
uj5u.com熱心網友回復:
是的,您可以將label.r引數設定為 0。
library(ggplot2)
ggplot(iris, aes(Sepal.Width, Sepal.Length)) geom_point()
geom_label(x=4, y=7, label = "Test label",
label.r = unit(0, "pt"))

由reprex 包(v2.0.1)于 2021 年 12 月 18 日創建
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/387229.html
