[R] Changing axis scale

Greg Snow Greg.Snow at intermountainmail.org
Wed Nov 21 21:10:26 CET 2007


The zoomplot function in the TeachingDemos package does this.  Note
however that it is a quick and dirty kludge that should only be used for
quick exploring.  If you plan to use the graph for anything more than
suggesting the next graph to make, then you should rerun the graphics
command setting the xlim or ylim parameters to what you want (and in my
opinion any plot command more than 1 line long (and even some 1 liners)
should be copied into a script window/file so that it is easy to edit
and rerun them (the plot2script function in TeachingDemos (another
kludge) or the history function in base (better) can help create the
script)).

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111
 
 

> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of mysimbaa
> Sent: Wednesday, November 21, 2007 7:53 AM
> To: r-help at r-project.org
> Subject: [R] Changing axis scale
> 
> 
> Hello R users,
> 
> Is it possible after making a plot(x,y) to change axis scale? 
> For example : I have a range of 0 to 3000 in my y-axis and I 
> want to make a zoom between 2000 and 3000.
> 
> 
> Thanks for any help.
> --
> View this message in context: 
> http://www.nabble.com/Changing-axis-scale-tf4850633.html#a13878705
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> 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.
> 



More information about the R-help mailing list