Re: [R] Space for X and Y axis labels

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Sat 24 Mar 2007 - 15:27:38 GMT

Your exampleisnot reproducible, but I guess you want to change the par("mar") setting ...

Uwe Ligges

Joseph Wakeling wrote:
> Hello all,
>
> I'm having a bit of a problem with x and y axis labels. Two things:
> first, if I want to create a plot with,
>
> plot.new()
> plot.window(.....)
> axis(1)
> axis(2)

> lines(...)
> points(...)
>
> [etc.]
>
> ... where do I introduce the xlab=... and ylab=... commands? I
> attempted this in plot.window() but no labels showed up.
>
> Second, here's a bit of real code...
>
> postscript(file="RPDfig.eps",onefile=FALSE,
> + horizontal=FALSE,paper="special",height=8.3,
> + width=11.7)
> matplot(2:length(PRICE),t(NWpd),type="l",xlim=c(0,200),
> + ylim=c(-0.1,0.1),xaxs="i",yaxs="i",xlab="Time",
> + ylab=expression(over(x,y)),bty="n")
> points(2:length(PRICE),Ppd,col="red")
> dev.off()
>
> Here the y label is meant to be x over y (a fraction), but the top part
> of the fraction is cut off by the border of the graphic. How can I fix
> this, either by creating extra space for the label or by insisting that
> the boundary of the graphic be extended to embrace the whole of the
> label? I've tried setting xpd=TRUE in the matplot command, but I'm not
> sure that is the correct option (and it makes no difference).
>
> Many thanks,
>
> -- Joe
>
> ______________________________________________
> 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
> and provide commented, minimal, self-contained, reproducible code.



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 and provide commented, minimal, self-contained, reproducible code. Received on Sun Mar 25 02:35:45 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 24 Mar 2007 - 19:30:42 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.