----- Original Message ----- From: "KENT V.T." <v.t.k...@durham.ac.uk>
To: <r-help@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.k...@durham.ac.uk
Email 2: vivien.k...@gmail.com
Web: www.graduatejunction.com/academic/vivien_kent


[[alternative HTML version deleted]]

______________________________________________
R-help@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.


______________________________________________
R-help@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.

Reply via email to