Re: [R] Scatterplot help

From: David Barron <mothsailor_at_googlemail.com>
Date: Mon 22 Jan 2007 - 09:23:01 GMT

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.

plot(x,y)
text(x,y,ID)
grid(2)

On 21/01/07, gnv shqp <gnvshqp@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@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

______________________________________________
R-help@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.
Received on Mon Jan 22 20:27:52 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 22 Jan 2007 - 10:30:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.