Ensuring two graphs have the same layout in Rgraphviz
2
0
Entering edit mode
@michael-watson-iah-c-378
Last seen 9.7 years ago
Hi Sorry for the obvious question, I read the PDFs and tried to figure it out but couldn't. I want to show two graphs, they have the same nodes but different edges. I want the nodes to stay in the same place for the two graphs, but obviously the edges will change. How do I ensure the nodes stay in the same place for both graphs? Many thanks Mick The information contained in this message may be confidentia...{{dropped}}
• 1.1k views
ADD COMMENT
0
Entering edit mode
Tony Chiang ▴ 570
@tony-chiang-1769
Last seen 9.7 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070129/ b20194f6/attachment.pl
ADD COMMENT
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070129/ 48ba2b80/attachment.pl
ADD REPLY
0
Entering edit mode
> I'm also now interested in controlling the appearance of the nodes. It > would seem that you can have a constant node size, with the label font > size determined by the size of the node; or a variable node size, with > the label font size determined by attributes. I would like a > combination, ie a consistent node size, but font size determined by > attributes, and overlapping the node shape edges where needed. > > Michael Hi Michael, unfortunately I don't think this can be done with the current implementation, see the body of setMethod("plot", "Ragraph", ... in https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/Rgraphviz/ R/graph.R (user: readonly, password: readonly). The code there is rather straightforward and simplistic, maybe if you are adventurous give it a try to improve it. If you think your changes would be of general use, you'd want to coordinate this with the maintainer Li Long who is currently refactoring much of the package, including this part (see also section 8 of the package vignette). Best wishes Wolfgang ------------------------------------------------------------------ Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber > > > From: tc.fhcrc at gmail.com [mailto:tc.fhcrc at gmail.com] On Behalf Of Tony > Chiang > Sent: 29 January 2007 12:59 > To: michael watson (IAH-C) > Cc: Bioconductor Mail List > Subject: Re: [BioC] Ensuring two graphs have the same layout in > Rgraphviz > > > Hi Michael, > > I don't know the exact answer to your question, but I do have a hack > solution. If you plot all the edges for both graphs, but make a subset > of the edges in graph 1 white (or what ever background color you use) > and then the complement of those edges in graph 2 white, you will get > two graphs with seemingly different > edges with the same layout. If there are any better solutions, I would > be interested to hear them as well. > > Cheers, > --TC > > > On 1/29/07, michael watson (IAH-C) <michael.watson at="" bbsrc.ac.uk=""> wrote: > > Hi > > Sorry for the obvious question, I read the PDFs and tried to > figure it > out but couldn't. I want to show two graphs, they have the same > nodes > but different edges. I want the nodes to stay in the same place > for the > two graphs, but obviously the edges will change. How do I > ensure the > nodes stay in the same place for both graphs? > > Many thanks > Mick > > The information contained in this message may be\ confident...{{dropped}} > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor --
ADD REPLY
0
Entering edit mode
Tony Chiang ▴ 570
@tony-chiang-1769
Last seen 9.7 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070129/ 776b92ee/attachment.pl
ADD COMMENT
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070129/ edd9dd41/attachment.pl
ADD REPLY
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070129/ b4a250d5/attachment.pl
ADD REPLY
0
Entering edit mode
Figured out that the breaks were due to extra edges I had defined as having color "white". This is why Mondays are bad. -----Original Message----- From: bioconductor-bounces@stat.math.ethz.ch [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of michael watson (IAH-C) Sent: 29 January 2007 14:30 To: Tony Chiang Cc: Bioconductor Mail List Subject: Re: [BioC] Ensuring two graphs have the same layout in Rgraphviz No problems. I think this may be more of a problem with my set up than with Rgraphviz, but we will see. I have a graph object, which I created using some data and code. I have also set the colors for the edges. Example 1 produces this: http://coxpress.sourceforge.net/g277network.jpg (broken edges at the top left node, and in the center) Example 2 produces this: http://coxpress.sourceforge.net/g2772network.jpg Now, I've looked at these in Internet Explorer, Irfanview and Adobe and some of the edges are broken all of them. Of course, this could just be my set up. How do they look to you? Code: # example1 attr <- getDefaultAttrs() attr$node$shape="ellipse" attr$node$fixedsize=TRUE attr$node$height=0.3 attr$node$width=0.3 jpeg("g277network.jpg", height=1000, width=1000, quality=100) plot(graph,"neato", edgeAttrs = eAttr, attrs=attr) dev.off() # example2 attr <- getDefaultAttrs() attr$node$shape="ellipse" attr$node$fixedsize=TRUE attr$node$height=0.3 attr$node$width=0.3 jpeg("g2772network.jpg", height=1000, width=1000, quality=100) par(lwd=2) plot(graph,"neato", edgeAttrs = eAttr, attrs=attr) dev.off() ________________________________ From: tc.fhcrc@gmail.com [mailto:tc.fhcrc@gmail.com] On Behalf Of Tony Chiang Sent: 29 January 2007 14:13 To: michael watson (IAH-C) Cc: Bioconductor Mail List Subject: Re: [BioC] Ensuring two graphs have the same layout in Rgraphviz Hi Mick, I don't think I have ever produced a graph where the edges and nodes were broken. But send the code and let me see if I or anyone else can reproduce this type of behaviour. I am going to copy the bioconductor list because if this turns out to be an error, then it would be nice to have this online so the list would also know. Hope that is ok with you. Cheers, --TC On 1/29/07, michael watson (IAH-C) <michael.watson at="" bbsrc.ac.uk=""> wrote: Hi Tony Just briefly taking this off the list as I am not sure if this is a problem just with my graphics card or if it is the package. The plots and images (both from jpeg() and bmp()) produced by Rgraphviz are not the best quality on my PC, with some edges and nodes appearing broken. Do you get this too, or is it just that my graphics card is not good enough? Thanks Mick ________________________________ From: tc.fhcrc at gmail.com [mailto:tc.fhcrc at gmail.com] On Behalf Of Tony Chiang Sent: 29 January 2007 12:59 To: michael watson (IAH-C) Cc: Bioconductor Mail List Subject: Re: [BioC] Ensuring two graphs have the same layout in Rgraphviz Hi Michael, I don't know the exact answer to your question, but I do have a hack solution. If you plot all the edges for both graphs, but make a subset of the edges in graph 1 white (or what ever background color you use) and then the complement of those edges in graph 2 white, you will get two graphs with seemingly different edges with the same layout. If there are any better solutions, I would be interested to hear them as well. Cheers, --TC On 1/29/07, michael watson (IAH-C) <michael.watson at="" bbsrc.ac.uk=""> wrote: Hi Sorry for the obvious question, I read the PDFs and tried to figure it out but couldn't. I want to show two graphs, they have the same nodes but different edges. I want the nodes to stay in the same place for the two graphs, but obviously the edges will change. How do I ensure the nodes stay in the same place for both graphs? Many thanks Mick The information contained in this message may be confidentia...{{dropped}} _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY

Login before adding your answer.

Traffic: 567 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6