[R] How to create a legend without plot, and to use scientific notation for axes label ?

Uwe Ligges ligges at statistik.tu-dortmund.de
Thu Apr 10 11:10:41 CEST 2008



Uwe Ligges wrote:
> 
> 
> Ng Stanley wrote:
>> Hi,
>>
>> I have a 3 by 2 plots per page, and would like to place a legend on 
>> the last
>> region. How to do that ?
> 
> 
> Create an empty plot, e.g.:
> 
> plot(1, type="n", axes=FALSE, xlab="", ylab="")
> legend(1, 1, legend = c("Hello", "World"), col=1:2,
>        lwd=2, cex=3, xjust=0.5, yjust=0.5)
> 
> Uwe Ligges
> 
> 
> 
>> Also, is there any way to specify scientific notation for axes label ?


Oh, I was too quick and forgot the 2nd question:
Use axis() with formatC().

Uwe Ligges





>>     [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide 
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list