I have a
plot(1,1)
legend("bottomleft", c("A","B","C"), lwd=3, bty="n",lty=c(1,3,4))
Is it possible to make the lines in the legend longer (base R only please)? It seems a bit difficult to immediately see the difference of lty=3 and lty=4 in the legend when the lines are so short. Increasing the lwd does not help either.
Thanks a lot
To change the legend size of the plot, the user needs to use the cex argument of the legend function and specify its value with the user requirement, the values of cex greater than 1 will increase the legend size in the plot and the value of cex less than 1 will decrease the size of the legend in the plot.
Direct link to this commentItemTokenSize = [x1,x2]; By default x1=30 and x2=18 so put larger or smaller numbers as x1,x2 to increase or decrease the legend line size.
You can set the seg.len
argument.
plot(1,1)
legend("bottomleft",
c("A","B","C"),
lwd=3, bty="n",lty=c(1,3,4),
seg.len=5
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With