Hi Nico,
Far from the most elegant solution, at least it works and will give you plenty of freedom to choose where to place the labels:
plot.zoo(x, type="l", main="", xlab="", ylab="",yaxt="n", xaxs="i"); title(main="Title", xlab="index")
mtext(names(x)[1],2,line=1,at=0.9)
mtext(names(x)[2],2,line=1,at=0.6)
mtext(names(x)[3],2,line=1,at=0.35)
mtext(names(x)[4],2,line=1,at=0.1)
Hope it helps,
Jos?
Jos? Iparraguirre
Chief Economist
Age UK
T 020 303 31482
E Jose.Iparraguirre at ageuk.org.uk
Twitter @jose.iparraguirre at ageuk
Tavis House, 1- 6 Tavistock Square
London, WC1H 9NB
www.ageuk.org.uk | ageukblog.org.uk | @ageukcampaigns
For evidence and statistics on the older population, visit the Age UK Knowledge Hub http://www.ageuk.org.uk/professional-resources-home/knowledge-hub-evidence-statistics/
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Nicolai Schneider
Sent: 10 September 2012 16:24
To: r-help at stat.math.ethz.ch
Subject: [R] Position of y axis labels in plot graphic
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)
Thanks in advance!
Best,
Nico