Re: [R] Plot: Distance between tick and tick label on y-axis

From: Paul Murrell <p.murrell_at_auckland.ac.nz>
Date: Thu 26 May 2005 - 09:58:11 EST

Hi

You might have more luck with par(mgp), for example, ...

par(las=1)

plot(runif(50), type="l",xaxt="n",yaxt="n",ylab="", bty="l")
axis(2, mgp=c(3, .5, 0))
axis(1, mgp=c(3, .3, 0))

Paul

Lapointe, Pierre wrote:
> Hello,
>
> I want to reduce the distance between my ticks and their labels. I managed
> to do it for the x-axis, but the y-axis puzzles me. Here's an example where
> there is no space between the x-asix ticks and labels.
>
> par(las=1)
> plot(runif(50), type="l",xaxt="n",yaxt="n",ylab="", bty="l")
> axis(2)
> axis(1,padj=-1.5)
>
> #However,
> axis(2,padj=-1.5) #does not work
>
> I understand from ?axis that padj will take its direction from the par(las).
> In this case, padj will move labels up and down for both x-axis and y-axis.
> I want my y-axis labels to be horizontal.
>
> I can I reduce the distance between y-axis ticks and labels?
>
>
> Regards,
>
> Pierre Lapointe
> Assistant Market Strategist
>
>
>
> ***********************************************************************************
> AVIS DE NON-RESPONSABILITE:\ Ce document transmis par courri...{{dropped}}
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul@stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu May 26 10:04:14 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:06 EST