Those graphs look like chromosome maps, if so, you may want to look into the 
bioconductor project, they may have some prewritten functions to do this.  If 
not, the lend argument (see ?par) may be something to look at.  If you really 
want points and segments you will need to plot the points with the points 
function and the segments separately.  Segments can take vectors, so you don't 
need to separate things into multiple calls.

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111

From: khush ........ [mailto:bioinfo.kh...@gmail.com]
Sent: Friday, June 11, 2010 12:00 AM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] points marking

Dear Gregory ,

Thnaks for your reply and help. I am explaining you my problems again, below  
is my script for the same .

Dom <-c (195,568,559)

fkbp <- barplot (Dom, col="black", xlab="", border = NA, space = 7, 
xlim=c(0,650), ylim =c(0, 87), las = 2, horiz = TRUE)

axis (1, at = seq(0,600,10), las =2)

1. ==============Segments 1=================================

segments(164,7.8,192,7.8, col = "green", pch=23, cex="9", lty="solid", lwd=20)
segments(45,15.8,138,15.8, col = "green", pch=23, cex="9", lty="solid", lwd=20)
segments(160,15.8,255,15.8, col = "green", pch=23, cex="9", lty="solid", lwd=20)
segments(277,15.8,378,15.8, col = "green", pch=23, cex="9", lty="solid", lwd=20)
segments(51,23.8,145,23.8, col = "green", pch=23, cex="9", lty="solid", lwd=20)
segments(167,23.8,262,23.8, col = "green", pch=23, cex="9", lty="solid", lwd=20)
segments(284,23.8,381,23.8, col = "green", pch=23, cex="9", lty="solid", lwd=20)

2. ==============Segments 2 ==================================
segments(399,15.8,432,15.8, col = "blue", pch=21, cex="9", lty="solid", lwd=20)
segments(448,15.8,475,15.8, col = "blue", pch=21, cex="9", lty="solid", lwd=20)
segments(486,15.8,515,15.8, col = "blue", pch=21, cex="9", lty="solid", lwd=20)
segments(401,23.8,434,23.8, col = "blue", pch=21, cex="9", lty="solid", lwd=20)
segments(450,23.8,475,23.8, col = "blue", pch=21, cex="9", lty="solid", lwd=20)
segments(486,23.8,517,23.8, col = "blue", pch=21, cex="9", lty="solid", lwd=20)

I solved one part of my query i.e to mark points from one positions to other is 
ok and I found that its working fine but I have another issue now, as I am 
using using two segments data 1 and 2 , although I want to draw different 
shapes for segmants 2 as I am giving pch=21, but I it seems to give a solid 
line for both. I want to draw different shapes for every chunk of segments i.e 
is the whole point.

I want to make script which can generate such figures, below is link to one of 
the tool.
http://www.expasy.ch/tools/mydomains/

Thank you

Jeet

On Thu, Jun 10, 2010 at 11:10 PM, Greg Snow 
<greg.s...@imail.org<mailto:greg.s...@imail.org>> wrote:
Your question is not really clear, do either of these examples do what you want?

 with(anscombe, plot(x1, y2, ylim=range(y2,y3)) )
 with(anscombe, points(x1, y3, col='blue', pch=2) )
 with(anscombe, segments(x1, y2, x1, y3, col=ifelse( y2>y3, 'green','red') ) )


 with(anscombe, plot(x1, y2, ylim=range(y2,y3), type='n') )
 with(anscombe[order(anscombe$x1),], polygon( c( x1,rev(x1) ), c(y2, rev(y3)), 
col='grey' ) )



--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org<mailto:greg.s...@imail.org>
801.408.8111


> -----Original Message-----
> From: r-help-boun...@r-project.org<mailto:r-help-boun...@r-project.org> 
> [mailto:r-help-boun...@r-<mailto:r-help-boun...@r->
> project.org<http://project.org>] On Behalf Of khush ........
> Sent: Thursday, June 10, 2010 7:48 AM
> To: r-help@r-project.org<mailto:r-help@r-project.org>
> Subject: [R] points marking
>
> Hi,
>
> How to  mark points on x axis of a graph keeping x axis as constant and
> changing y from y1 to y2 respectively. I want to highlight the area
> from y1
> to y2.
>
> Any suggestions
>
> Thank you
> Jeet
>
>       [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org<mailto: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]]

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

Reply via email to