Hi,
I am not sure whether I completely understood your question. Anyway,
here it's a simple code that, hopefully, overcome your problem.

Data=cbind(c(1, 2, -1, 3,  -2.2), c(1, 3, -1, -1.8, 4))
plot(x=rep(0,nrow(Data)), Data[,1], axes=F, xlim=c(-max(Data[,2]),
max(Data[,2])), xlab="", col=1:nrow(Data), cex=2)
axis(2)
for(i in 1:nrow(Data)){
    segments(x0=0, y0=Data[i,1], x1=Data[i,1] + Data[i,2], y1=Data[i,1],
col=i)
}

Best,
Carlo Giovani Camarda

===========================================
Camarda Carlo Giovanni
PhD-Student
Max Planck Institute for Demographic Research
Konrad-Zuse-Strasse 1
18057 Rostock, Germany
Tel:  +49 (0)381 2081 172
Fax: +49 (0)381 2081 472
[EMAIL PROTECTED]
===========================================




Date: Tue, 9 May 2006 15:10:37 -0400
From: "Wang, Xuetao" <[EMAIL PROTECTED]>
Subject: [R] draw a graphic using segments to  represent data
To: r-help@stat.math.ethz.ch
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain

Hello,

 

I'd like to draw a graphic using different color line segments to
represent microarray data.  It simply likes this:

Data=cbind(c(1, 2, -1, 3,  -2.2), c(1, 3, -1, -1.8, 4))

The first col No represents y'axis position (negative down and positive
up). The second col No represents a length of segment (negative segment
should be on left of y, and positive on right). Also the segment color
on I, II, III, IV should be different.

 

Thank you for your time and help.

 

Xueato


----------
This mail has been sent through the MPI for Demographic Rese...{{dropped}}

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to