[R] Plot colour according to column

Jim Lemon jim at bitwrit.com.au
Wed Feb 9 08:49:11 CET 2011


On 02/08/2011 09:14 PM, anoopmj wrote:
>
> Hi,
>
> I am trying to plot several columns in different graphs in columns and rows.
> The first column of my data file is the time, and the third is the
> 'elevation angle' with 19 different numbers. I would like to plot the rest
> of the columns with the x axis as time and the individual angles in
> different colours.
>
Hi anoopmj,
I'm not sure that I understand what you want to do, but perhaps this 
will help:

HCHO$time<-strptime(HCHO$V1,format="%H:%M:%S")
plot(HCHO$time,HCHO$V4,type="h",col=HCHO$colors)
HCHO<-read.table("qdoas.qdo",sep="\t")

Jim



More information about the R-help mailing list