Longer lines in legend()

graph, legend, plot, r

Solution

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
)

Problem

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

Original source