?plot
Will give a good solution
#Example:
set.seed(5)
xx <- data.frame(x = runif(50), y = runif(50), z = sample(c(1:3), 50, T))
with(xx, plot(x, y, col = z, pch = 19))
Now you can start going into how to play with the colors, and how to add
?legend to the image...
Tal
----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili@gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------
On Thu, Nov 18, 2010 at 4:08 PM, Alaios <alaios@yahoo.com> wrote:
> Hello everyone.
> I want some help with plots.
> I have some robots in an area. Every robot is placed on x,y coordinates and
> every robot has a power consumption of some watts. I would like to show
> where are the robots by showing in a map dots (where every dots is the x,y
> coordinate).
> Below that dot it would be nice to write the watt consumption but also use
> some colors to denote different classes of consumption. So 10-20watt should
> be denoted by blue 20-30 with red, 30-40 with pink and so on.
>
> Which is the appropriate plot function for that?
>
> Regards
> Alex
>
>
>
>
> [[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.
>
[[alternative HTML version deleted]]