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? 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@durham.ac.uk Email 2: vivien.kent@gmail.com Web: www.graduatejunction.com/academic/vivien_kent [[alternative HTML version deleted]]
try: plot(..., axes=FALSE) axis(1, pos=0) On Mon, Jun 28, 2010 at 9:28 AM, KENT V.T. <v.t.kent at durham.ac.uk> wrote:> 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? > > 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. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?
----- 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. >