Dear xpeRts,
I would like to ask a question about plotting in R.
I have four columns in which first column contains x-coordinate and second
column contains y-coordinate of certain points, whereas the third column "z"
contains classification number of those points from 1 to 4, it should be noted
that this column doesn't quantify anything, but just classify the points. More
precisely like the following
> dput(v)
structure(list(x = c(52.5211966906669, 49.8818953734405, 45.176643179385,
52.2988909042952, 46.1007828702965, 53.4910266471472, 49.013651970548,
55.1218462810432, 56.922347550005, 50.7531277271902), y = c(23.953008533893,
45.1590889001506, 62.5358474328017, 39.4861634272874, 49.3108455233261,
46.0010163238786, 46.5779093951996, 37.4552698003145, 46.4057156535496,
56.667549695452), z = c(1, 4, 1, 2, 1, 3, 4, 2, 1, 3), r = 1:10), .Names =
c("x",
"y", "z", "r"), row.names = c(NA, -10L), class = "data.frame")
What i want to do is to locate, in the space of "x" and "y", each point (in
classified section) with different shape for each classified section range from
1 to 4, by command "pch".
There should also be a y-axis on the right end of x-axis (secondary axis),
which carries the the point number as in column "r". As there are ten points so
that axis should range to 10 for the presentation of each point number. More
precisely, z=1 should be located at a point where x=52.52120, y=23.95301 and
r=1.
where,
x= x-axis
y=y-axis on the left end of x-axis
r=y-axis on the right end of x-axis (secondary axis)
For points belonging to classification 1 there should be a triangle
For points belonging to classification 2 there should be a rectangle
and so on...
in my orinigal data i have 5 classifications.
i hope i was clear, but in case i my wording is confusing, kindly let me know.
Elisa
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.