Change the length of lines in a legend
2 answers
If you use this in a larger script, other packages may mask the function legend()
. These "other" functions may not contain a parameter seg.len
. Thus, you have to reference the main function legend
. You can easily achieve this by adding a package like this:
graphics::legend(1, 1.5, legend = "Test", lty = 1, seg.len = 2)
+1
source to share
This code works fine for me (see image output below).
I suggest you do the following:
- Download and install the latest R files. Load R
- If you are using RStudio, download and install the most recent version. Download RStudio
0
source to share