移除小提琴图上的边框。

huangapple go评论52阅读模式
英文:

Remove borders on a violin plot

问题

我想移除我的小提琴图上的黑色轮廓 - 我不想要任何轮廓
请帮忙!小提琴图与一个箱线图分组。
不知道应该使用什么代码
谢谢 移除小提琴图上的边框。

英文:

I want to remove the black outline on my violin plot - I don't want an outline at all
Please help! The violin plot is grouped with a box plot.
Can't work out what code I should use

Thanks 移除小提琴图上的边框。

答案1

得分: 2

"The "outline" of geom_violin is controlled by the linewidth parameter, just set it to zero in your geom_violin."

英文:

The "outline" of geom_violin is controlled by the linewidth parameter, just set it to zero in your geom_violin.

library(tidyverse)

ggplot(diamonds, aes(cut, price)) + geom_violin(linewidth = 0)

移除小提琴图上的边框。<!-- -->

<sup>Created on 2023-05-11 with reprex v2.0.2</sup>

答案2

得分: 2

Another potential option is to set the colour to "transparent", i.e.

library(tidyverse)

ggplot(diamonds, aes(x = cut, y = price)) +
  geom_violin(color = "透明")

移除小提琴图上的边框。<!-- -->

<sup>2023-05-11 创建,使用 reprex v2.0.2</sup>

英文:

Another potential option is to set the colour to "transparent", i.e.

library(tidyverse)

ggplot(diamonds, aes(x = cut, y = price)) +
  geom_violin(color = &quot;transparent&quot;)

移除小提琴图上的边框。<!-- -->

<sup>Created on 2023-05-11 with reprex v2.0.2</sup>

huangapple
  • 本文由 发表于 2023年5月11日 11:56:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/76224055.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定