[R] plot x-axis at 0

Greg Snow Greg.Snow at intermountainmail.org
Fri Sep 28 23:22:04 CEST 2007


Use xaxt='n' in the original plot to suppress the default axis (or
axes=FALSE to supress both), then axis(1, pos=0) to draw the axis at 0.

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 James
> Sent: Friday, September 28, 2007 3:13 PM
> To: r-help at r-project.org
> Subject: [R] plot x-axis at 0
> 
> Hi,
> 
> I am trying to create a plot of a simple P&L graph for an 
> option I'm pricing using Rmetrics.  I'm not trying to do 
> anything fancy.  I just want to figure out if it's possible 
> to put the x-axis at 0 rather than at the bottom the the 
> entire plot.  It seems like something that would be 
> relatively easy to do.  Any help or hints would be greatly 
> appreciated.  Thanks.
> 
> James
> 
> ______________________________________________
> 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