[BioC] new hexbin + adding points to hexbin plots

Ariel Chernomoretz ariel.chernomoretz at crchul.ulaval.ca
Mon Jul 18 20:04:41 CEST 2005


Hi Naomi,

pushHexport  is included in new versions of hexbin package (for instance in 
hexbin 1.3.0 from the development branch)

I am not an expert using grid but I think once you make the hexbin plot
the current viewport (using pushHexport) you can use any function of
the grid package on it (i.e. grid.points, grid.text, etc)

A./



On July 18, 2005 01:38 pm, Naomi Altman wrote:
> Thanks Ariel,
>
> I was not able to find
>
> pushHexport
>
> and it does not appear using help.search.
>
> --Naomi
>
> At 01:27 PM 7/18/2005, Ariel Chernomoretz wrote:
> >Hi Naomi,
> >
> >You could try something like this,
> >
> >  hbin<-hexbin(xx,yy,xbins=50)                    #hexbin plot
> >  pp<-plot(hbin,legend=FALSE)
> >
> >
> >  pushHexport(pp$plot.vp)
> >  x<-seq(4,13,length=100)                               #points you want
> > to add
> >  y<-mysigma.rma.bio1(x)                              #to the hexbin plot
> >  grid.points(x,y,gp=gpar(col=2),pch=20)
> >  popViewport()
> >
> >Regards,
> >Ariel./
> >
> >On July 18, 2005 01:16 pm, Naomi Altman wrote:
> > > When I download hexbin from Bioconductor and then use library(hexbin) I
> > > get the message that I should download the newest version.
> > >
> > > The old version is fine for what I want to do, except that I would like
> > > to add some points to the plot.
> > >
> > > e.g.  an MA plot with controls highlighted
> > >
> > > plot(MA$A[,1],MA$M[,1],main="MA plot")
> > > points(MA$A[mypoints,1],MA$M[mypoints,1],col=2)
> > >
> > > I want to replace the first plot command with hexbin (so I can actually
> > > visualize the dense region of the plot), but I want to be able to add
> > > my points to the plot.
> > >
> > >
> > > plot(hexbin(MA$A[,1],MA$M[,1]),main="MA plot")
> > > points(MA$A[mypoints,1],MA$M[mypoints,1],col=2)
> > >
> > > does not give an error message.  But the points do not show up.
> > >
> > > If the new version can do this, could someone please point me to the
> > > download site.
> > >
> > > Thanks,
> > >
> > >
> > > Naomi S. Altman                                814-865-3791 (voice)
> > > Associate Professor
> > > Bioinformatics Consulting Center
> > > Dept. of Statistics                              814-863-7114 (fax)
> > > Penn State University                         814-865-1348 (Statistics)
> > > University Park, PA 16802-2111
> > >
> > > _______________________________________________
> > > Bioconductor mailing list
> > > Bioconductor at stat.math.ethz.ch
> > > https://stat.ethz.ch/mailman/listinfo/bioconductor
> >
> >--
> >Ariel Chernomoretz, Ph.D.
> >Centre de recherche du CHUL
> >2705 Blv Laurier, bloc T-367
> >Sainte-Foy, Qc
> >G1V 4G2
> >(418)-525-4444 ext 46339
> >
> >_______________________________________________
> >Bioconductor mailing list
> >Bioconductor at stat.math.ethz.ch
> >https://stat.ethz.ch/mailman/listinfo/bioconductor
>
> Naomi S. Altman                                814-865-3791 (voice)
> Associate Professor
> Bioinformatics Consulting Center
> Dept. of Statistics                              814-863-7114 (fax)
> Penn State University                         814-865-1348 (Statistics)
> University Park, PA 16802-2111
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor

-- 
Ariel Chernomoretz, Ph.D.
Centre de recherche du CHUL
2705 Blv Laurier, bloc T-367
Sainte-Foy, Qc
G1V 4G2
(418)-525-4444 ext 46339



More information about the Bioconductor mailing list