# [R] help with par

Martin Maechler maechler at stat.math.ethz.ch
Tue May 21 17:00:52 CEST 2002

```>>>>> "Olivier" == Olivier Martin <olivier.martin at inrialpes.fr> writes:

Olivier> Dear R-users,
Olivier> Using the plot function, I would like that axes are [-1,1] for x and
Olivier> [-1,1] for  y.
Olivier> But when I use xlim or ylim, it adds automaticaly a small space (i.e.
Olivier> [-1.25,1.25]).
Olivier> I suppose that i have to use the fuction par() but  i don't find the
Olivier> good parameter for this problem.
Olivier> So, how can i define the axes to be exactly [-1,1].

Solution: ``axis style'' --> `xaxs' and `yaxs'

## an example with [-2,2]  {for y} :
op <- par(yaxs="i")
plot(1:100, rnorm(100), ylim = c(-2,2))
par(op)

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

```