[R] plot more series or more colors

0 views
Skip to first unread message

joonR

unread,
Feb 15, 2010, 5:50:26 PM2/15/10
to r-h...@r-project.org

Hey,
I need either to plot more than one series of data on the same plot,
or to color the points of a single series with different colors according to
some parameter,
how can I do that?

(data are 2 coordinates point that I want to plot in 2D)

THANKS!
--
View this message in context: http://n4.nabble.com/plot-more-series-or-more-colors-tp1556751p1556751.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-h...@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.

David Winsemius

unread,
Feb 15, 2010, 6:31:58 PM2/15/10
to joonR, r-h...@r-project.org

On Feb 15, 2010, at 5:50 PM, joonR wrote:

>
> Hey,
> I need either to plot more than one series of data on the same plot,
> or to color the points of a single series with different colors
> according to
> some parameter,
> how can I do that?
>
> (data are 2 coordinates point that I want to plot in 2D)

?plot # col argument
?points

Sample data might have provoked a more expansive reply.

###----------


> and provide commented, minimal, self-contained, reproducible code.

###----------

David Winsemius, MD
Heritage Laboratories
West Hartford, CT

Jim Lemon

unread,
Feb 15, 2010, 6:50:00 PM2/15/10
to joonR, r-h...@r-project.org
On 02/16/2010 09:50 AM, joonR wrote:
>
> Hey,
> I need either to plot more than one series of data on the same plot,
> or to color the points of a single series with different colors according to
> some parameter,
> how can I do that?
>
> (data are 2 coordinates point that I want to plot in 2D)
>
Hi joonR,
Look at the color.scale and smoothColors functions in the plotrix
package. The former translates numeric values into colors along an
arbitrary color dimension and the latter allows the user to define a
series of colors between an arbitrary number of color anchors. You might
also want to look at the colourschemes package.

Jim

joonR

unread,
Feb 18, 2010, 4:22:49 PM2/18/10
to r-h...@r-project.org

Thanks for helping!
--
View this message in context: http://n4.nabble.com/plot-more-series-or-more-colors-tp1556751p1560863.html

Sent from the R help mailing list archive at Nabble.com.

______________________________________________

Reply all
Reply to author
Forward
0 new messages