[R] legend for the plot with type = "b"
Jinsong Zhao
jszhao at yeah.net
Mon Sep 23 17:00:57 CEST 2013
On 2013/9/23 12:52, David Winsemius wrote:
>
> On Sep 22, 2013, at 10:54 PM, Jinsong Zhao wrote:
>
>> Hi there,
>>
>> I plot a simple plot with the following code:
>>
>> plot (rnorm(1:10), type = "b")
>> legend("top", "test", lty = 1, pch = 21)
>
> ?par
> plot (rnorm(1:10), type = "b")
> legend("top", "test", lty = "69", pch = 21)
Thank you very much, it works like a champ! I never know the line in
legend can be draw like that.
Regards,
Jinsong
>
>>
>> The result is something wired for the line crosses the point in the
>> legend while the line does not cross the point in the main plot.
>>
>> Is there possibility to draw the legend that line does not cross the
>> point, i.e., like the pattern in the main plot?
>>
>> Any help is really appreciated.
>
More information about the R-help
mailing list