【问题标题】:R plot legend with transparent background具有透明背景的 R 绘图图例
【发布时间】:2016-04-29 13:20:45
【问题描述】:

使用plot()函数时如何用透明背景绘制图例?

【问题讨论】:

  • 你可以在legend里面使用bty="n"
  • 还要注意 legend 接受 bg 参数,以便您可以根据需要使用不同的颜色填充背景。

标签: r plot legend alpha-transparency


【解决方案1】:

使用:bg="transparent" in

legend()

如:

legend("right",bg="transparent",col=c(as.numeric(unique(df$group2))),cex=0.5)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-02-15
    • 2016-09-19
    • 2020-10-29
    • 1970-01-01
    • 1970-01-01
    • 2012-05-26
    • 2014-08-07
    • 2013-03-29
    相关资源
    最近更新 更多