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.
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
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