Re: [R] points marking

From: khush ........ <bioinfo.khush_at_gmail.com>
Date: Fri, 11 Jun 2010 11:30:04 +0530

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.Snow_at_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.snow_at_imail.org
> 801.408.8111
>
>
> > -----Original Message-----
> > From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-
> > project.org] On Behalf Of khush ........
> > Sent: Thursday, June 10, 2010 7:48 AM
> > To: r-help_at_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_at_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_at_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. Received on Fri 11 Jun 2010 - 06:02:27 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 11 Jun 2010 - 16:40:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive