[R] Scatterplot help

David Barron mothsailor at googlemail.com
Mon Jan 22 10:23:01 CET 2007

The following three lines will do what you want.  You will probably
want to change some of the default behaviour; just look at the
relevant help pages.


On 21/01/07, gnv shqp <gnvshqp at gmail.com> wrote:
> Hi my friends,
> I'm trying to make a scatterplot like this.
> 1) I have a 3-variable dataset.  They are ID, x, and y.
> 2) "x" is for the X-axis, "y" for the Y-axis, and "ID" is used to label all
> the cases in the scatterplot.
> 3) After creating the scatterplot, I need to add both a X-axis  reference
> line and a Y-axis reference line.  The X-axis reference line is a vertical
> line starting from the center of the X-axis.  The Y-axis reference line is a
> horizontal line starting from the center of the Y-axis.  In other words, by
> creating the two reference lines, the scatterplot is divided into 4
> quadrants.
> Please help me figure out how to do that in R.
> Many thanks in advance!
> Feng
>         [[alternative HTML version deleted]]
> ______________________________________________
> R-help at stat.math.ethz.ch 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.

David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP

More information about the R-help mailing list