Re: [R] Axes in polymars

From: Gavin Simpson <gavin.simpson_at_ucl.ac.uk>
Date: Wed, 05 Mar 2008 21:21:32 +0000

On Wed, 2008-03-05 at 15:32 -0500, Shewcraft, Ryan wrote:
> Hi All,
>
> I can't quite figure out how to change the parameters of the x and y
> axes when I plot a polymars object. I want to add a scatterplot of the
> data points, but the polymars plot seems to automatically set the
> parameters to fit the polymars line. I've tried using plot(poly,1,fig=
> c(x1,x2,y1,y2)) but have no luck. Any thoughts?
>
> Thanks,
> Ryan

If I understand what you mean by parameters, see the xlim and ylim arguments to plot.polymars(). So say you want the x and y axes to range from 0 to 1:

x.lim <- y.lim <- c(0,1)
plot(poly, 1, xlim = x.lim, ylim = y.lim)

If you have data then try range() on the x and y values respectively and store the results as your x and y limits.

HTH G

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
R-help_at_r-project.org 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 Wed 05 Mar 2008 - 21:30:14 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 05 Mar 2008 - 22:30:20 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.

list of date sections of archive