[R] Position of y axis labels in plot graphic

David Winsemius dwinsemius at comcast.net
Mon Sep 10 23:17:48 CEST 2012


On Sep 10, 2012, at 8:24 AM, Nicolai Schneider wrote:

> Hello,
> 
> I´m really sorry to bother you with this problem but it took me a whole day searching for a solution.
> 
> I want the y axis labels positioned closer to the y axis, by default they are partly outside the window.
> 
> 
> Example:
> 
> x <- as.zoo(EuStockMarkets)
> 
> par(las=1)
> 
> plot.zoo(x, type="l", main="", xlab="", yaxt="n", xaxs="i")
> title(main="Title", xlab="index")
> 
> par(las=0)

I could be wrong, but I think you need to specify xaxt="n" to suppress the standard axis and then use axis to supply your own choices.

-- 

David Winsemius, MD
Alameda, CA, USA




More information about the R-help mailing list