gpt4 book ai didi

r - 图例中的线宽?

转载 作者:行者123 更新时间:2023-12-02 07:36:48 26 4
gpt4 key购买 nike

我想改变图例中线条的宽度。目前我有:

legend(-0.145, 25, c("(Gaussian) Kernel density","fitted normal distribution"),lwd=1.8, cex=0.8, 
col=c("black","black"), lty=1:2)

lwd 似乎改变了文本,但没有改变线条和虚线的宽度,我该怎么做?

最佳答案

我认为你错了,lwd 设置了图例中的线宽:

比较这个(上图):

plot(rnorm(100)*13)
legend(-0.145, 25, c("(Gaussian) Kernel density","fitted normal distribution"),lwd=0.1, cex=0.8,
col=c("black","black"), lty=1:2)

有了这个( basemap ):

plot(rnorm(100)*13)
legend(-0.145, 25, c("(Gaussian) Kernel density","fitted normal distribution"),lwd=3, cex=0.8,
col=c("black","black"), lty=1:2)

enter image description here

关于r - 图例中的线宽?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15434867/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com