[R] Axes intercept

Robert Baer rbaer at atsu.edu
Mon Jun 28 16:48:26 CEST 2010


----- Original Message ----- 
From: "KENT V.T." <v.t.kent at durham.ac.uk>
To: <r-help at r-project.org>
Sent: Monday, June 28, 2010 8:28 AM
Subject: [R] Axes intercept


>I have a plot where the values of the y axis go from a positive number to a 
>negative number and I want the x axis to intercept at zero rather than at 
>the bottom of the y axis, regardless of its value. Can anyone help me to do 
>this?

?plot
?axis

As a toy example:
y=rnorm(100)
x=abs(y)
plot(x, y, axes=FALSE)
axis(1, pos=0)
axis(2)
box()


>
> Thanks in advance
>
> Vivien
>
>
>
> Vivien Kent MSc Oxon
> PhD candidate
> Evolutionary Anthropology Research Group
> Department of Anthropology
> Durham University
> Dawson Building
> South Road
> Durham
> DH1 3LE
> United Kingdom
> Email 1: v.t.kent at durham.ac.uk
> Email 2: vivien.kent at gmail.com
> Web: www.graduatejunction.com/academic/vivien_kent
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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