[R] Legend's attribute

Uwe Ligges ligges at statistik.tu-dortmund.de
Fri Feb 26 16:54:10 CET 2010



On 26.02.2010 05:22, Yi Du wrote:
> Hi there,
>
>
> I use plot(type="o") to draw the line. And I need put some legend to this
> line. But how can I let the legend to display the line type in the graph
> generated from type="o"? I can only find the lty in the legend. But I tried
> several times and still failed.


Use both  pch=1, lty=1  as arguments.


> Also, if I use abline(h=0.08) to draw a horizontal line and I also want to
> show 0.08 in the y-axis, how can I do it?


See ?mtext

Uwe Ligges


>
> Many thanks,
>
>
> Yi
>



More information about the R-help mailing list