Zroutik Zroutik
2008-Aug-11 12:16 UTC
[R] line with of the symbols in the legend -- changable?
Dear R users, I plot data with points(my_data[x]~x, col = x, type = "o", lwd="4") where x is an integer running from 1 to 10, I get points drawn at the plot. When want to do a legend to this I try legend(leg.txt[x], col = x, text.col = 1, pch = 1, bty = "n") where leg.txt contains the names of the variable and x behaves the same. The difference between the symbols is the line width. At points(I can define the with of the line the points are drawn), but at the legend there is no such a function. Using lwd widens, but produces additional line thought the point. Any suggestion how to widen the line at the legend symbols? Thanks for any. Zroutik [[alternative HTML version deleted]]
Zroutik Zroutik
2008-Aug-11 12:18 UTC
[R] line with of the symbols in the legend -- changable?
OK, sorry, I misread the help page: pt.lwd does what was requested below. Zroutik On Mon, Aug 11, 2008 at 2:16 PM, Zroutik Zroutik <zroutik@gmail.com> wrote:> Dear R users, > > I plot data with > > points(my_data[x]~x, col = x, type = "o", lwd="4") > > where x is an integer running from 1 to 10, I get points drawn at the plot. > When want to do a legend to this I try > > legend(leg.txt[x], col = x, text.col = 1, pch = 1, bty = "n") > > where leg.txt contains the names of the variable and x behaves the same. > The difference between the symbols is the line width. At points(I can define > the with of the line the points are drawn), but at the legend there is no > such a function. Using lwd widens, but produces additional line thought the > point. Any suggestion how to widen the line at the legend symbols? Thanks > for any. > > Zroutik >[[alternative HTML version deleted]]