Rgraphviz: Edge attributes not displaying
1
0
Entering edit mode
@jarrett-byrnes-1989
Last seen 7.4 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070201/ cca3757b/attachment.pl
• 729 views
0
Entering edit mode
@kasper-daniel-hansen-2979
Last seen 6 months ago
United States
I can confirm the problem. I'll have a look at the source code today or (more likely) tomorrow. Kasper On Feb 1, 2007, at 11:36 AM, Jarrett Byrnes wrote: > Hey, all. I'm working on some methods with Rgraphviz to plot sem > objects (structrual equation models from the sem library) and have > run into a problem. It would seem that Rgraphviz is not dealing with > edge properties correctly. I've tried the following sample code: > > set.seed(123) > V <- letters[1:10] > M <- 1:4 > g1 <- randomGraph(V, M, 0.2) > > nAttrs <- list() > eAttrs <- list() > > z <- strsplit(packageDescription("Rgraphviz")$Description, " ")[[1]] > z <- z[1:numNodes(g1)] > names(z) = nodes(g1) > > nAttrs$label <- z > eAttrs$label <- c("a~h" = "Label 1", "c~h" = "Label 2") > > attrs <- list(node = list(shape = "ellipse", fixedsize = FALSE)) > plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) > > > And instead of labeling the edges, they become more angled/straight > and less curved. I've had similar problems with my own functions > that I'm coding. Similarly, when I specify "solid" or "dashed" > nothing happens. I'd be happy to send a picture, if you would like. > Although making solid or dashed a label instead of a style tends to > again straighten the edges. > > FYI, I'm running R 2.4.1 and Rgraphviz 1.12.3 (the most current) and > the proper version of xgvis that's needed to install this version of > Rgraphviz. All of this is on a mac running OSX 10.4.8. > > Any clue why this might be happening/is there a fix? > > -Jarrett > > > > > ---------------------------------------- > Jarrett Byrnes > Population Biology Graduate Group, UC Davis > Bodega Marine Lab > 707-875-1969 > http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml > > > [[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 COMMENT 0 Entering edit mode Hi, Some attributes affect layout, while others don't. For edges, "label"-attribute does affect layout, as documented by graphviz. That's why you see the edges are plotted differently after adding labels. The attribute for line type, "lty" in Ragraph-class, is not retrieved from graphviz at present, so it does not have any effect. Some newly added functions (in devel branch) allow you to see a nicely rendered graph by using "toFile" function to output the graph to a file (.svg, .ps, etc.). This function invokes the renderer from graphviz and honors many more attributes nicely. The work is underway to render the graphs (laid out by graphviz) better: to honor more attributes, to honor them better. Li > I can confirm the problem. I'll have a look at the source code today or (more likely) tomorrow. > > Kasper > > On Feb 1, 2007, at 11:36 AM, Jarrett Byrnes wrote: > >> Hey, all. I'm working on some methods with Rgraphviz to plot sem objects (structrual equation models from the sem library) and have run into a problem. It would seem that Rgraphviz is not dealing with edge properties correctly. I've tried the following sample code: set.seed(123) >> V <- letters[1:10] >> M <- 1:4 >> g1 <- randomGraph(V, M, 0.2) >> nAttrs <- list() >> eAttrs <- list() >> z <- strsplit(packageDescription("Rgraphviz")$Description, " ")[[1]] z <- z[1:numNodes(g1)] >> names(z) = nodes(g1) >> nAttrs$label <- z >> eAttrs$label <- c("a~h" = "Label 1", "c~h" = "Label 2") >> attrs <- list(node = list(shape = "ellipse", fixedsize = FALSE)) plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) And instead of labeling the edges, they become more angled/straight and less curved. I've had similar problems with my own functions that I'm coding. Similarly, when I specify "solid" or "dashed" nothing happens. I'd be happy to send a picture, if you would like. Although making solid or dashed a label instead of a style tends to again straighten the edges. >> FYI, I'm running R 2.4.1 and Rgraphviz 1.12.3 (the most current) and the proper version of xgvis that's needed to install this version of Rgraphviz. All of this is on a mac running OSX 10.4.8. >> Any clue why this might be happening/is there a fix? >> -Jarrett >> ---------------------------------------- >> Jarrett Byrnes >> Population Biology Graduate Group, UC Davis >> Bodega Marine Lab >> 707-875-1969 >> http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml >> [[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 > > _______________________________________________ > 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 >
0
Entering edit mode
I see. So, lty (aka style in the Rgraphviz documentataion - or should one use $lty) just doesn't work yet? That still does not explain why labels are not showing up. On Feb 2, 2007, at 1:43 AM, Li.Long at isb-sib.ch wrote: > Hi, > > Some attributes affect layout, while others don't. For edges, > "label"-attribute does affect layout, as documented by graphviz. > That's > why you see the edges are plotted differently after adding labels. > > The attribute for line type, "lty" in Ragraph-class, is not > retrieved from > graphviz at present, so it does not have any effect. > > Some newly added functions (in devel branch) allow you to see a nicely > rendered graph by using "toFile" function to output the graph to a > file > (.svg, .ps, etc.). This function invokes the renderer from > graphviz and > honors many more attributes nicely. > > The work is underway to render the graphs (laid out by graphviz) > better: > to honor more attributes, to honor them better. > > Li > > >> I can confirm the problem. I'll have a look at the source code >> today or > (more likely) tomorrow. >> >> Kasper >> >> On Feb 1, 2007, at 11:36 AM, Jarrett Byrnes wrote: >> >>> Hey, all. I'm working on some methods with Rgraphviz to plot sem > objects (structrual equation models from the sem library) and have run > into a problem. It would seem that Rgraphviz is not dealing with edge > properties correctly. I've tried the following sample code: > set.seed(123) >>> V <- letters[1:10] >>> M <- 1:4 >>> g1 <- randomGraph(V, M, 0.2) >>> nAttrs <- list() >>> eAttrs <- list() >>> z <- strsplit(packageDescription("Rgraphviz")$Description, " ") >>> [[1]] z > <- z[1:numNodes(g1)] >>> names(z) = nodes(g1) >>> nAttrs$label <- z >>> eAttrs$label <- c("a~h" = "Label 1", "c~h" = "Label 2") >>> attrs <- list(node = list(shape = "ellipse", fixedsize = FALSE)) > plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) And > instead of labeling the edges, they become more angled/straight and > less curved. I've had similar problems with my own functions that I'm > coding. Similarly, when I specify "solid" or "dashed" nothing > happens. > I'd be happy to send a picture, if you would like. Although making > solid or dashed a label instead of a style tends to again straighten > the edges. >>> FYI, I'm running R 2.4.1 and Rgraphviz 1.12.3 (the most current) and > the proper version of xgvis that's needed to install this version of > Rgraphviz. All of this is on a mac running OSX 10.4.8. >>> Any clue why this might be happening/is there a fix? >>> -Jarrett >>> ---------------------------------------- >>> Jarrett Byrnes >>> Population Biology Graduate Group, UC Davis >>> Bodega Marine Lab >>> 707-875-1969 >>> http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml >>> [[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 >> >> _______________________________________________ >> 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 >> > >
0
Entering edit mode
As Jarrett says, this does not explain why the labels don't show up. Jarrett: could you do a R> graphvizVersion() for me. And are you on an Intel or PPC machine? I have spent some time in GDB and I am stuck for the moment. Notes for Li and me: R> library(Rgraphviz) gdb> break getEdgeLocs run Jarrett's example gdb> break 124 gdb> cont (continue 5 times I think). Now we should be at the first edge with a label, it has the attribute set correctly: (gdb) p agget(edge, "label") $19 = 0x2113cac "Label 1" But the label is not reflected in the laidout structure, instead of a textlabel we get a pointer to NULL: (gdb) p edge->u.label$20 = (textlabel_t *) 0x0 I am at a loss here, running Graphviz 2.12 on Mac PPC. Do you see the same Li? Perhaps there have been some changes in how to read the labels? Anyway, bedtime. Kasper On Feb 2, 2007, at 11:52 AM, Jarrett Byrnes wrote: > I see. So, lty (aka style in the Rgraphviz documentataion - or > should one use $lty) just doesn't work yet? That still does not > explain why labels are not showing up. > > On Feb 2, 2007, at 1:43 AM, Li.Long at isb-sib.ch wrote: > >> Hi, >> >> Some attributes affect layout, while others don't. For edges, >> "label"-attribute does affect layout, as documented by graphviz. >> That's >> why you see the edges are plotted differently after adding labels. >> >> The attribute for line type, "lty" in Ragraph-class, is not >> retrieved from >> graphviz at present, so it does not have any effect. >> >> Some newly added functions (in devel branch) allow you to see a >> nicely >> rendered graph by using "toFile" function to output the graph to a >> file >> (.svg, .ps, etc.). This function invokes the renderer from >> graphviz and >> honors many more attributes nicely. >> >> The work is underway to render the graphs (laid out by graphviz) >> better: >> to honor more attributes, to honor them better. >> >> Li >> >> >>> I can confirm the problem. I'll have a look at the source code >>> today or >> (more likely) tomorrow. >>> >>> Kasper >>> >>> On Feb 1, 2007, at 11:36 AM, Jarrett Byrnes wrote: >>> >>>> Hey, all. I'm working on some methods with Rgraphviz to plot sem >> objects (structrual equation models from the sem library) and have >> run >> into a problem. It would seem that Rgraphviz is not dealing with >> edge >> properties correctly. I've tried the following sample code: >> set.seed(123) >>>> V <- letters[1:10] >>>> M <- 1:4 >>>> g1 <- randomGraph(V, M, 0.2) >>>> nAttrs <- list() >>>> eAttrs <- list() >>>> z <- strsplit(packageDescription("Rgraphviz")$Description, " ") >>>> [[1]] z >> <- z[1:numNodes(g1)] >>>> names(z) = nodes(g1) >>>> nAttrs$label <- z >>>> eAttrs$label <- c("a~h" = "Label 1", "c~h" = "Label 2") >>>> attrs <- list(node = list(shape = "ellipse", fixedsize = FALSE)) >> plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) And >> instead of labeling the edges, they become more angled/straight and >> less curved. I've had similar problems with my own functions that >> I'm >> coding. Similarly, when I specify "solid" or "dashed" nothing >> happens. >> I'd be happy to send a picture, if you would like. Although making >> solid or dashed a label instead of a style tends to again straighten >> the edges. >>>> FYI, I'm running R 2.4.1 and Rgraphviz 1.12.3 (the most current) >>>> and >> the proper version of xgvis that's needed to install this version of >> Rgraphviz. All of this is on a mac running OSX 10.4.8. >>>> Any clue why this might be happening/is there a fix? >>>> -Jarrett >>>> ---------------------------------------- >>>> Jarrett Byrnes >>>> Population Biology Graduate Group, UC Davis >>>> Bodega Marine Lab >>>> 707-875-1969 >>>> http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml >>>> [[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 >>> >>> _______________________________________________ >>> 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 >>> >> >> > > _______________________________________________ > 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
0
Entering edit mode
graphvizVersion gives me graphvizVersion() I am on PPC G4 Powerbook. Sorry that this is such a pickle - and if line style ends up being fixed as well, that would be ever so wonderful. I'd like to use this method (the plot.sem I'm whipping up) in a seminar tutorial on R and SEM later in the week, but I understand if that's not possible. Thanks so much! -Jarrett On Feb 3, 2007, at 11:31 PM, Kasper Daniel Hansen wrote: > As Jarrett says, this does not explain why the labels don't show up. > > Jarrett: could you do a > R> graphvizVersion() > for me. And are you on an Intel or PPC machine? > > I have spent some time in GDB and I am stuck for the moment. > > Notes for Li and me: > R> library(Rgraphviz) > gdb> break getEdgeLocs > run Jarrett's example > gdb> break 124 > gdb> cont > (continue 5 times I think). Now we should be at the first edge with > a label, it has the attribute set correctly: > > (gdb) p agget(edge, "label") > $19 = 0x2113cac "Label 1" > > But the label is not reflected in the laidout structure, instead of > a textlabel we get a pointer to NULL: > > (gdb) p edge->u.label >$20 = (textlabel_t *) 0x0 > > I am at a loss here, running Graphviz 2.12 on Mac PPC. Do you see > the same Li? Perhaps there have been some changes in how to read > the labels? Anyway, bedtime. > > Kasper > > > > > > On Feb 2, 2007, at 11:52 AM, Jarrett Byrnes wrote: > >> I see. So, lty (aka style in the Rgraphviz documentataion - or >> should one use $lty) just doesn't work yet? That still does not >> explain why labels are not showing up. >> >> On Feb 2, 2007, at 1:43 AM, Li.Long at isb-sib.ch wrote: >> >>> Hi, >>> >>> Some attributes affect layout, while others don't. For edges, >>> "label"-attribute does affect layout, as documented by graphviz. >>> That's >>> why you see the edges are plotted differently after adding labels. >>> >>> The attribute for line type, "lty" in Ragraph-class, is not >>> retrieved from >>> graphviz at present, so it does not have any effect. >>> >>> Some newly added functions (in devel branch) allow you to see a >>> nicely >>> rendered graph by using "toFile" function to output the graph to a >>> file >>> (.svg, .ps, etc.). This function invokes the renderer from >>> graphviz and >>> honors many more attributes nicely. >>> >>> The work is underway to render the graphs (laid out by graphviz) >>> better: >>> to honor more attributes, to honor them better. >>> >>> Li >>> >>> >>>> I can confirm the problem. I'll have a look at the source code >>>> today or >>> (more likely) tomorrow. >>>> >>>> Kasper >>>> >>>> On Feb 1, 2007, at 11:36 AM, Jarrett Byrnes wrote: >>>> >>>>> Hey, all. I'm working on some methods with Rgraphviz to plot sem >>> objects (structrual equation models from the sem library) and >>> have run >>> into a problem. It would seem that Rgraphviz is not dealing with >>> edge >>> properties correctly. I've tried the following sample code: >>> set.seed(123) >>>>> V <- letters[1:10] >>>>> M <- 1:4 >>>>> g1 <- randomGraph(V, M, 0.2) >>>>> nAttrs <- list() >>>>> eAttrs <- list() >>>>> z <- strsplit(packageDescription("Rgraphviz")$Description, " ") >>>>> [[1]] z >>> <- z[1:numNodes(g1)] >>>>> names(z) = nodes(g1) >>>>> nAttrs$label <- z >>>>> eAttrs$label <- c("a~h" = "Label 1", "c~h" = "Label 2") >>>>> attrs <- list(node = list(shape = "ellipse", fixedsize = FALSE)) >>> plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) And >>> instead of labeling the edges, they become more angled/straight and >>> less curved. I've had similar problems with my own functions >>> that I'm >>> coding. Similarly, when I specify "solid" or "dashed" nothing >>> happens. >>> I'd be happy to send a picture, if you would like. Although making >>> solid or dashed a label instead of a style tends to again straighten >>> the edges. >>>>> FYI, I'm running R 2.4.1 and Rgraphviz 1.12.3 (the most >>>>> current) and >>> the proper version of xgvis that's needed to install this version of >>> Rgraphviz. All of this is on a mac running OSX 10.4.8. >>>>> Any clue why this might be happening/is there a fix? >>>>> -Jarrett >>>>> ---------------------------------------- >>>>> Jarrett Byrnes >>>>> Population Biology Graduate Group, UC Davis >>>>> Bodega Marine Lab >>>>> 707-875-1969 >>>>> http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml >>>>> [[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 >>>> >>>> _______________________________________________ >>>> 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 >>>> >>> >>> >> >> _______________________________________________ >> 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
0
Entering edit mode
I mean, version 2.8 Sorry! On Feb 4, 2007, at 7:43 AM, Jarrett Byrnes wrote: > graphvizVersion gives me graphvizVersion() > > I am on PPC G4 Powerbook. > > Sorry that this is such a pickle - and if line style ends up being > fixed as well, that would be ever so wonderful. I'd like to use this > method (the plot.sem I'm whipping up) in a seminar tutorial on R and > SEM later in the week, but I understand if that's not possible. > > Thanks so much! > > -Jarrett > > On Feb 3, 2007, at 11:31 PM, Kasper Daniel Hansen wrote: > >> As Jarrett says, this does not explain why the labels don't show up. >> >> Jarrett: could you do a >> R> graphvizVersion() >> for me. And are you on an Intel or PPC machine? >> >> I have spent some time in GDB and I am stuck for the moment. >> >> Notes for Li and me: >> R> library(Rgraphviz) >> gdb> break getEdgeLocs >> run Jarrett's example >> gdb> break 124 >> gdb> cont >> (continue 5 times I think). Now we should be at the first edge with >> a label, it has the attribute set correctly: >> >> (gdb) p agget(edge, "label") >> $19 = 0x2113cac "Label 1" >> >> But the label is not reflected in the laidout structure, instead of >> a textlabel we get a pointer to NULL: >> >> (gdb) p edge->u.label >>$20 = (textlabel_t *) 0x0 >> >> I am at a loss here, running Graphviz 2.12 on Mac PPC. Do you see >> the same Li? Perhaps there have been some changes in how to read >> the labels? Anyway, bedtime. >> >> Kasper >> >> >> >> >> >> On Feb 2, 2007, at 11:52 AM, Jarrett Byrnes wrote: >> >>> I see. So, lty (aka style in the Rgraphviz documentataion - or >>> should one use $lty) just doesn't work yet? That still does not >>> explain why labels are not showing up. >>> >>> On Feb 2, 2007, at 1:43 AM, Li.Long at isb-sib.ch wrote: >>> >>>> Hi, >>>> >>>> Some attributes affect layout, while others don't. For edges, >>>> "label"-attribute does affect layout, as documented by graphviz. >>>> That's >>>> why you see the edges are plotted differently after adding labels. >>>> >>>> The attribute for line type, "lty" in Ragraph-class, is not >>>> retrieved from >>>> graphviz at present, so it does not have any effect. >>>> >>>> Some newly added functions (in devel branch) allow you to see a >>>> nicely >>>> rendered graph by using "toFile" function to output the graph to a >>>> file >>>> (.svg, .ps, etc.). This function invokes the renderer from >>>> graphviz and >>>> honors many more attributes nicely. >>>> >>>> The work is underway to render the graphs (laid out by graphviz) >>>> better: >>>> to honor more attributes, to honor them better. >>>> >>>> Li >>>> >>>> >>>>> I can confirm the problem. I'll have a look at the source code >>>>> today or >>>> (more likely) tomorrow. >>>>> >>>>> Kasper >>>>> >>>>> On Feb 1, 2007, at 11:36 AM, Jarrett Byrnes wrote: >>>>> >>>>>> Hey, all. I'm working on some methods with Rgraphviz to plot sem >>>> objects (structrual equation models from the sem library) and >>>> have run >>>> into a problem. It would seem that Rgraphviz is not dealing with >>>> edge >>>> properties correctly. I've tried the following sample code: >>>> set.seed(123) >>>>>> V <- letters[1:10] >>>>>> M <- 1:4 >>>>>> g1 <- randomGraph(V, M, 0.2) >>>>>> nAttrs <- list() >>>>>> eAttrs <- list() >>>>>> z <- strsplit(packageDescription("Rgraphviz")$Description, " ") >>>>>> [[1]] z >>>> <- z[1:numNodes(g1)] >>>>>> names(z) = nodes(g1) >>>>>> nAttrs$label <- z >>>>>> eAttrs$label <- c("a~h" = "Label 1", "c~h" = "Label 2") >>>>>> attrs <- list(node = list(shape = "ellipse", fixedsize = FALSE)) >>>> plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) And >>>> instead of labeling the edges, they become more angled/straight and >>>> less curved. I've had similar problems with my own functions >>>> that I'm >>>> coding. Similarly, when I specify "solid" or "dashed" nothing >>>> happens. >>>> I'd be happy to send a picture, if you would like. Although making >>>> solid or dashed a label instead of a style tends to again >>>> straighten >>>> the edges. >>>>>> FYI, I'm running R 2.4.1 and Rgraphviz 1.12.3 (the most >>>>>> current) and >>>> the proper version of xgvis that's needed to install this >>>> version of >>>> Rgraphviz. All of this is on a mac running OSX 10.4.8. >>>>>> Any clue why this might be happening/is there a fix? >>>>>> -Jarrett >>>>>> ---------------------------------------- >>>>>> Jarrett Byrnes >>>>>> Population Biology Graduate Group, UC Davis >>>>>> Bodega Marine Lab >>>>>> 707-875-1969 >>>>>> http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml >>>>>> [[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 >>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>> >>>> >>> >>> _______________________________________________ >>> 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 > > _______________________________________________ > 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
0
Entering edit mode
On my linux (R2.4 + graphviz 2.8/2.12), the edge labels DO show up... I don't have Mac on hand... On the other hand, I don't see any codes that are Mac-ed or Apple-ed in either Rgraphviz or graphviz. You can do (in R): g1 <- layoutGraph(g), then look at g1's AgEdge info to see if the label info are available. If they are, then the problem is likely to be in rendering on Mac, other wise, it's more to do with retrieving label info. In case of the latter, I would try to change the following line (in doLayout.c) from if ( edge->u.label != NULL ) to if ( agget(edge, "label") ) just to see what happens... Li > As Jarrett says, this does not explain why the labels don't show up. > > Jarrett: could you do a > R> graphvizVersion() > for me. And are you on an Intel or PPC machine? > > I have spent some time in GDB and I am stuck for the moment. > > Notes for Li and me: > R> library(Rgraphviz) > gdb> break getEdgeLocs > run Jarrett's example > gdb> break 124 > gdb> cont > (continue 5 times I think). Now we should be at the first edge with a > label, it has the attribute set correctly: > > (gdb) p agget(edge, "label") > $19 = 0x2113cac "Label 1" > > But the label is not reflected in the laidout structure, instead of a > textlabel we get a pointer to NULL: > > (gdb) p edge->u.label >$20 = (textlabel_t *) 0x0 > > I am at a loss here, running Graphviz 2.12 on Mac PPC. Do you see the > same Li? Perhaps there have been some changes in how to read the > labels? Anyway, bedtime. > > Kasper > > > > > > On Feb 2, 2007, at 11:52 AM, Jarrett Byrnes wrote: > >> I see. So, lty (aka style in the Rgraphviz documentataion - or >> should one use $lty) just doesn't work yet? That still does not >> explain why labels are not showing up. >> >> On Feb 2, 2007, at 1:43 AM, Li.Long at isb-sib.ch wrote: >> >>> Hi, >>> >>> Some attributes affect layout, while others don't. For edges, >>> "label"-attribute does affect layout, as documented by graphviz. >>> That's >>> why you see the edges are plotted differently after adding labels. >>> >>> The attribute for line type, "lty" in Ragraph-class, is not >>> retrieved from >>> graphviz at present, so it does not have any effect. >>> >>> Some newly added functions (in devel branch) allow you to see a >>> nicely >>> rendered graph by using "toFile" function to output the graph to a >>> file >>> (.svg, .ps, etc.). This function invokes the renderer from >>> graphviz and >>> honors many more attributes nicely. >>> >>> The work is underway to render the graphs (laid out by graphviz) >>> better: >>> to honor more attributes, to honor them better. >>> >>> Li >>> >>> >>>> I can confirm the problem. I'll have a look at the source code >>>> today or >>> (more likely) tomorrow. >>>> >>>> Kasper >>>> >>>> On Feb 1, 2007, at 11:36 AM, Jarrett Byrnes wrote: >>>> >>>>> Hey, all. I'm working on some methods with Rgraphviz to plot sem >>> objects (structrual equation models from the sem library) and have >>> run >>> into a problem. It would seem that Rgraphviz is not dealing with >>> edge >>> properties correctly. I've tried the following sample code: >>> set.seed(123) >>>>> V <- letters[1:10] >>>>> M <- 1:4 >>>>> g1 <- randomGraph(V, M, 0.2) >>>>> nAttrs <- list() >>>>> eAttrs <- list() >>>>> z <- strsplit(packageDescription("Rgraphviz")$Description, " ") >>>>> [[1]] z >>> <- z[1:numNodes(g1)] >>>>> names(z) = nodes(g1) >>>>> nAttrs$label <- z >>>>> eAttrs$label <- c("a~h" = "Label 1", "c~h" = "Label 2") >>>>> attrs <- list(node = list(shape = "ellipse", fixedsize = FALSE)) >>> plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) And >>> instead of labeling the edges, they become more angled/straight and >>> less curved. I've had similar problems with my own functions that >>> I'm >>> coding. Similarly, when I specify "solid" or "dashed" nothing >>> happens. >>> I'd be happy to send a picture, if you would like. Although making >>> solid or dashed a label instead of a style tends to again straighten >>> the edges. >>>>> FYI, I'm running R 2.4.1 and Rgraphviz 1.12.3 (the most current) >>>>> and >>> the proper version of xgvis that's needed to install this version of >>> Rgraphviz. All of this is on a mac running OSX 10.4.8. >>>>> Any clue why this might be happening/is there a fix? >>>>> -Jarrett >>>>> ---------------------------------------- >>>>> Jarrett Byrnes >>>>> Population Biology Graduate Group, UC Davis >>>>> Bodega Marine Lab >>>>> 707-875-1969 >>>>> http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml >>>>> [[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 >>>> >>>> _______________________________________________ >>>> 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 >>>> >>> >>> >> >> _______________________________________________ >> 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 >
0
Entering edit mode
I'm unclear as to what you mean by object g. I'm assuming that you mean the Ragraph object generated by plot. So, I did the following, after running the previous code from my first post: > g2<-plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) > > g<-layoutGraph(g2) > AgEdge(g) [[1]] An edge between e and b with 1 BezierCurve objects: 257,706 223,656 121,506 87,456 [[2]] An edge between f and b with 1 BezierCurve objects: 268,704 268,653 268,508 268,457 [[3]] An edge between j and b with 1 BezierCurve objects: 272,704 293,618 382,247 407,141 [[4]] An edge between j and e with 1 BezierCurve objects: 91,423 147,370 328,196 391,135 [[5]] An edge between j and i with 1 BezierCurve objects: 539,421 517,367 451,205 425,140 Note, however, the following > g2$edgeAttrs NULL On Feb 5, 2007, at 2:13 AM, Li.Long at isb-sib.ch wrote: > > On my linux (R2.4 + graphviz 2.8/2.12), the edge labels DO show up... > > I don't have Mac on hand... On the other hand, I don't see any > codes that > are Mac-ed or Apple-ed in either Rgraphviz or graphviz. > > You can do (in R): g1 <- layoutGraph(g), then look at g1's AgEdge > info to > see if the label info are available. If they are, then the problem is > likely to be in rendering on Mac, other wise, it's more to do with > retrieving label info. > > In case of the latter, I would try to change the following line (in > doLayout.c) from > if ( edge->u.label != NULL ) > to > if ( agget(edge, "label") ) > just to see what happens... > > Li > > > > >> As Jarrett says, this does not explain why the labels don't show up. >> >> Jarrett: could you do a >> R> graphvizVersion() >> for me. And are you on an Intel or PPC machine? >> >> I have spent some time in GDB and I am stuck for the moment. >> >> Notes for Li and me: >> R> library(Rgraphviz) >> gdb> break getEdgeLocs >> run Jarrett's example >> gdb> break 124 >> gdb> cont >> (continue 5 times I think). Now we should be at the first edge with a >> label, it has the attribute set correctly: >> >> (gdb) p agget(edge, "label") >>$19 = 0x2113cac "Label 1" >> >> But the label is not reflected in the laidout structure, instead of a >> textlabel we get a pointer to NULL: >> >> (gdb) p edge->u.label >> $20 = (textlabel_t *) 0x0 >> >> I am at a loss here, running Graphviz 2.12 on Mac PPC. Do you see the >> same Li? Perhaps there have been some changes in how to read the >> labels? Anyway, bedtime. >> >> Kasper >> >> >> >> >> >> On Feb 2, 2007, at 11:52 AM, Jarrett Byrnes wrote: >> >>> I see. So, lty (aka style in the Rgraphviz documentataion - or >>> should one use$lty) just doesn't work yet? That still does not >>> explain why labels are not showing up. >>> >>> On Feb 2, 2007, at 1:43 AM, Li.Long at isb-sib.ch wrote: >>> >>>> Hi, >>>> >>>> Some attributes affect layout, while others don't. For edges, >>>> "label"-attribute does affect layout, as documented by graphviz. >>>> That's >>>> why you see the edges are plotted differently after adding labels. >>>> >>>> The attribute for line type, "lty" in Ragraph-class, is not >>>> retrieved from >>>> graphviz at present, so it does not have any effect. >>>> >>>> Some newly added functions (in devel branch) allow you to see a >>>> nicely >>>> rendered graph by using "toFile" function to output the graph to a >>>> file >>>> (.svg, .ps, etc.). This function invokes the renderer from >>>> graphviz and >>>> honors many more attributes nicely. >>>> >>>> The work is underway to render the graphs (laid out by graphviz) >>>> better: >>>> to honor more attributes, to honor them better. >>>> >>>> Li >>>> >>>> >>>>> I can confirm the problem. I'll have a look at the source code >>>>> today or >>>> (more likely) tomorrow. >>>>> >>>>> Kasper >>>>> >>>>> On Feb 1, 2007, at 11:36 AM, Jarrett Byrnes wrote: >>>>> >>>>>> Hey, all. I'm working on some methods with Rgraphviz to plot sem >>>> objects (structrual equation models from the sem library) and have >>>> run >>>> into a problem. It would seem that Rgraphviz is not dealing with >>>> edge >>>> properties correctly. I've tried the following sample code: >>>> set.seed(123) >>>>>> V <- letters[1:10] >>>>>> M <- 1:4 >>>>>> g1 <- randomGraph(V, M, 0.2) >>>>>> nAttrs <- list() >>>>>> eAttrs <- list() >>>>>> z <- strsplit(packageDescription("Rgraphviz")$Description, " ") >>>>>> [[1]] z >>>> <- z[1:numNodes(g1)] >>>>>> names(z) = nodes(g1) >>>>>> nAttrs$label <- z >>>>>> eAttrs$label <- c("a~h" = "Label 1", "c~h" = "Label 2") >>>>>> attrs <- list(node = list(shape = "ellipse", fixedsize = FALSE)) >>>> plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) And >>>> instead of labeling the edges, they become more angled/straight and >>>> less curved. I've had similar problems with my own functions that >>>> I'm >>>> coding. Similarly, when I specify "solid" or "dashed" nothing >>>> happens. >>>> I'd be happy to send a picture, if you would like. Although making >>>> solid or dashed a label instead of a style tends to again >>>> straighten >>>> the edges. >>>>>> FYI, I'm running R 2.4.1 and Rgraphviz 1.12.3 (the most current) >>>>>> and >>>> the proper version of xgvis that's needed to install this >>>> version of >>>> Rgraphviz. All of this is on a mac running OSX 10.4.8. >>>>>> Any clue why this might be happening/is there a fix? >>>>>> -Jarrett >>>>>> ---------------------------------------- >>>>>> Jarrett Byrnes >>>>>> Population Biology Graduate Group, UC Davis >>>>>> Bodega Marine Lab >>>>>> 707-875-1969 >>>>>> http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml >>>>>> [[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 >>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>> >>>> >>> >>> _______________________________________________ >>> 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 Hi, Here's what I got on my Linux: > g2 <- plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) > AgEdge(g2)[[5]]@txtLabel at labelText [1] "Label 1" > AgEdge(g2)[[10]]@txtLabel at labelText [1] "Label 2" Index 5/10 are the two edges you set labels on. For me, they are "Label 1" and "Label 2" as you set. I would double check on Mac to see if they are like that. If you do see these label texts, then the problem has more to do with rendering. Various things could go wrong: (just my speculation) a wrong color could make text invisible, function "lines" could have trouble dealing with labels, function "plot" might have problem on Mac, etc. If you don't see these label texts, we need to look further into how these labels are handled in Rgraphviz/graphviz on Mac. Li > I'm unclear as to what you mean by object g. I'm assuming that you > mean the Ragraph object generated by plot. So, I did the following, > after running the previous code from my first post: > > > g2<-plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) > > > > g<-layoutGraph(g2) > > AgEdge(g) > [[1]] > An edge between e and b with 1 BezierCurve objects: > 257,706 223,656 121,506 87,456 > > [[2]] > An edge between f and b with 1 BezierCurve objects: > 268,704 268,653 268,508 268,457 > > [[3]] > An edge between j and b with 1 BezierCurve objects: > 272,704 293,618 382,247 407,141 > > [[4]] > An edge between j and e with 1 BezierCurve objects: > 91,423 147,370 328,196 391,135 > > [[5]] > An edge between j and i with 1 BezierCurve objects: > 539,421 517,367 451,205 425,140 > > > Note, however, the following > > > g2$edgeAttrs > NULL > > > > > On Feb 5, 2007, at 2:13 AM, Li.Long at isb-sib.ch wrote: > >> >> On my linux (R2.4 + graphviz 2.8/2.12), the edge labels DO show up... >> >> I don't have Mac on hand... On the other hand, I don't see any >> codes that >> are Mac-ed or Apple-ed in either Rgraphviz or graphviz. >> >> You can do (in R): g1 <- layoutGraph(g), then look at g1's AgEdge >> info to >> see if the label info are available. If they are, then the problem is >> likely to be in rendering on Mac, other wise, it's more to do with >> retrieving label info. >> >> In case of the latter, I would try to change the following line (in >> doLayout.c) from >> if ( edge->u.label != NULL ) >> to >> if ( agget(edge, "label") ) >> just to see what happens... >> >> Li >> >> >> >> >>> As Jarrett says, this does not explain why the labels don't show up. >>> >>> Jarrett: could you do a >>> R> graphvizVersion() >>> for me. And are you on an Intel or PPC machine? >>> >>> I have spent some time in GDB and I am stuck for the moment. >>> >>> Notes for Li and me: >>> R> library(Rgraphviz) >>> gdb> break getEdgeLocs >>> run Jarrett's example >>> gdb> break 124 >>> gdb> cont >>> (continue 5 times I think). Now we should be at the first edge with a >>> label, it has the attribute set correctly: >>> >>> (gdb) p agget(edge, "label") >>> $19 = 0x2113cac "Label 1" >>> >>> But the label is not reflected in the laidout structure, instead of a >>> textlabel we get a pointer to NULL: >>> >>> (gdb) p edge->u.label >>>$20 = (textlabel_t *) 0x0 >>> >>> I am at a loss here, running Graphviz 2.12 on Mac PPC. Do you see the >>> same Li? Perhaps there have been some changes in how to read the >>> labels? Anyway, bedtime. >>> >>> Kasper >>> >>> >>> >>> >>> >>> On Feb 2, 2007, at 11:52 AM, Jarrett Byrnes wrote: >>> >>>> I see. So, lty (aka style in the Rgraphviz documentataion - or >>>> should one use $lty) just doesn't work yet? That still does not >>>> explain why labels are not showing up. >>>> >>>> On Feb 2, 2007, at 1:43 AM, Li.Long at isb-sib.ch wrote: >>>> >>>>> Hi, >>>>> >>>>> Some attributes affect layout, while others don't. For edges, >>>>> "label"-attribute does affect layout, as documented by graphviz. >>>>> That's >>>>> why you see the edges are plotted differently after adding labels. >>>>> >>>>> The attribute for line type, "lty" in Ragraph-class, is not >>>>> retrieved from >>>>> graphviz at present, so it does not have any effect. >>>>> >>>>> Some newly added functions (in devel branch) allow you to see a >>>>> nicely >>>>> rendered graph by using "toFile" function to output the graph to a >>>>> file >>>>> (.svg, .ps, etc.). This function invokes the renderer from >>>>> graphviz and >>>>> honors many more attributes nicely. >>>>> >>>>> The work is underway to render the graphs (laid out by graphviz) >>>>> better: >>>>> to honor more attributes, to honor them better. >>>>> >>>>> Li >>>>> >>>>> >>>>>> I can confirm the problem. I'll have a look at the source code >>>>>> today or >>>>> (more likely) tomorrow. >>>>>> >>>>>> Kasper >>>>>> >>>>>> On Feb 1, 2007, at 11:36 AM, Jarrett Byrnes wrote: >>>>>> >>>>>>> Hey, all. I'm working on some methods with Rgraphviz to plot sem >>>>> objects (structrual equation models from the sem library) and have >>>>> run >>>>> into a problem. It would seem that Rgraphviz is not dealing with >>>>> edge >>>>> properties correctly. I've tried the following sample code: >>>>> set.seed(123) >>>>>>> V <- letters[1:10] >>>>>>> M <- 1:4 >>>>>>> g1 <- randomGraph(V, M, 0.2) >>>>>>> nAttrs <- list() >>>>>>> eAttrs <- list() >>>>>>> z <- strsplit(packageDescription("Rgraphviz")$Description, " ") >>>>>>> [[1]] z >>>>> <- z[1:numNodes(g1)] >>>>>>> names(z) = nodes(g1) >>>>>>> nAttrs$label <- z >>>>>>> eAttrs$label <- c("a~h" = "Label 1", "c~h" = "Label 2") >>>>>>> attrs <- list(node = list(shape = "ellipse", fixedsize = FALSE)) >>>>> plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) And >>>>> instead of labeling the edges, they become more angled/straight and >>>>> less curved. I've had similar problems with my own functions that >>>>> I'm >>>>> coding. Similarly, when I specify "solid" or "dashed" nothing >>>>> happens. >>>>> I'd be happy to send a picture, if you would like. Although making >>>>> solid or dashed a label instead of a style tends to again >>>>> straighten >>>>> the edges. >>>>>>> FYI, I'm running R 2.4.1 and Rgraphviz 1.12.3 (the most current) >>>>>>> and >>>>> the proper version of xgvis that's needed to install this >>>>> version of >>>>> Rgraphviz. All of this is on a mac running OSX 10.4.8. >>>>>>> Any clue why this might be happening/is there a fix? >>>>>>> -Jarrett >>>>>>> ---------------------------------------- >>>>>>> Jarrett Byrnes >>>>>>> Population Biology Graduate Group, UC Davis >>>>>>> Bodega Marine Lab >>>>>>> 707-875-1969 >>>>>>> http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml >>>>>>> [[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 >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>>>> >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> 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 >>> >
0
Entering edit mode
Nope, I get something very different > AgEdge(g2)[[5]]@txtLabel at labelText character(0) > AgEdge(g2)[[10]]@txtLabel at labelText character(0) Given what I saw looking at the edgeAttrs of the Ragraph object itself, (namely, Null), I'm guessing that the problem is there. This may also be why edge style (solid v. dashed) wasn't getting picked up. Why it is different on linux instead of a mac, I am uncertain, unless there are different binaries in the Bioconductor archive. But I could be wrong about that, as I don't know the code. On Feb 5, 2007, at 8:21 AM, Li.Long at isb-sib.ch wrote: > > Hi, > > Here's what I got on my Linux: > >> g2 <- plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) >> AgEdge(g2)[[5]]@txtLabel at labelText > [1] "Label 1" >> AgEdge(g2)[[10]]@txtLabel at labelText > [1] "Label 2" > > Index 5/10 are the two edges you set labels on. For me, they are > "Label > 1" and "Label 2" as you set. I would double check on Mac to see if > they > are > like that. > > If you do see these label texts, then the problem has more to do with > rendering. Various things could go wrong: (just my speculation) a > wrong > color could make text invisible, function "lines" could have trouble > dealing with labels, function "plot" might have problem on Mac, etc. > > If you don't see these label texts, we need to look further into > how these > labels are handled in Rgraphviz/graphviz on Mac. > > Li > > >> I'm unclear as to what you mean by object g. I'm assuming that you >> mean the Ragraph object generated by plot. So, I did the following, >> after running the previous code from my first post: >> >>> g2<-plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) >>> >>> g<-layoutGraph(g2) >>> AgEdge(g) >> [[1]] >> An edge between e and b with 1 BezierCurve objects: >> 257,706 223,656 121,506 87,456 >> >> [[2]] >> An edge between f and b with 1 BezierCurve objects: >> 268,704 268,653 268,508 268,457 >> >> [[3]] >> An edge between j and b with 1 BezierCurve objects: >> 272,704 293,618 382,247 407,141 >> >> [[4]] >> An edge between j and e with 1 BezierCurve objects: >> 91,423 147,370 328,196 391,135 >> >> [[5]] >> An edge between j and i with 1 BezierCurve objects: >> 539,421 517,367 451,205 425,140 >> >> >> Note, however, the following >> >>> g2$edgeAttrs >> NULL >> >> >> >> >> On Feb 5, 2007, at 2:13 AM, Li.Long at isb-sib.ch wrote: >> >>> >>> On my linux (R2.4 + graphviz 2.8/2.12), the edge labels DO show >>> up... >>> >>> I don't have Mac on hand... On the other hand, I don't see any >>> codes that >>> are Mac-ed or Apple-ed in either Rgraphviz or graphviz. >>> >>> You can do (in R): g1 <- layoutGraph(g), then look at g1's AgEdge >>> info to >>> see if the label info are available. If they are, then the >>> problem is >>> likely to be in rendering on Mac, other wise, it's more to do with >>> retrieving label info. >>> >>> In case of the latter, I would try to change the following line (in >>> doLayout.c) from >>> if ( edge->u.label != NULL ) >>> to >>> if ( agget(edge, "label") ) >>> just to see what happens... >>> >>> Li >>> >>> >>> >>> >>>> As Jarrett says, this does not explain why the labels don't show >>>> up. >>>> >>>> Jarrett: could you do a >>>> R> graphvizVersion() >>>> for me. And are you on an Intel or PPC machine? >>>> >>>> I have spent some time in GDB and I am stuck for the moment. >>>> >>>> Notes for Li and me: >>>> R> library(Rgraphviz) >>>> gdb> break getEdgeLocs >>>> run Jarrett's example >>>> gdb> break 124 >>>> gdb> cont >>>> (continue 5 times I think). Now we should be at the first edge >>>> with a >>>> label, it has the attribute set correctly: >>>> >>>> (gdb) p agget(edge, "label") >>>>$19 = 0x2113cac "Label 1" >>>> >>>> But the label is not reflected in the laidout structure, instead >>>> of a >>>> textlabel we get a pointer to NULL: >>>> >>>> (gdb) p edge->u.label >>>> $20 = (textlabel_t *) 0x0 >>>> >>>> I am at a loss here, running Graphviz 2.12 on Mac PPC. Do you >>>> see the >>>> same Li? Perhaps there have been some changes in how to read the >>>> labels? Anyway, bedtime. >>>> >>>> Kasper >>>> >>>> >>>> >>>> >>>> >>>> On Feb 2, 2007, at 11:52 AM, Jarrett Byrnes wrote: >>>> >>>>> I see. So, lty (aka style in the Rgraphviz documentataion - or >>>>> should one use$lty) just doesn't work yet? That still does not >>>>> explain why labels are not showing up. >>>>> >>>>> On Feb 2, 2007, at 1:43 AM, Li.Long at isb-sib.ch wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> Some attributes affect layout, while others don't. For edges, >>>>>> "label"-attribute does affect layout, as documented by graphviz. >>>>>> That's >>>>>> why you see the edges are plotted differently after adding >>>>>> labels. >>>>>> >>>>>> The attribute for line type, "lty" in Ragraph-class, is not >>>>>> retrieved from >>>>>> graphviz at present, so it does not have any effect. >>>>>> >>>>>> Some newly added functions (in devel branch) allow you to see a >>>>>> nicely >>>>>> rendered graph by using "toFile" function to output the graph >>>>>> to a >>>>>> file >>>>>> (.svg, .ps, etc.). This function invokes the renderer from >>>>>> graphviz and >>>>>> honors many more attributes nicely. >>>>>> >>>>>> The work is underway to render the graphs (laid out by graphviz) >>>>>> better: >>>>>> to honor more attributes, to honor them better. >>>>>> >>>>>> Li >>>>>> >>>>>> >>>>>>> I can confirm the problem. I'll have a look at the source code >>>>>>> today or >>>>>> (more likely) tomorrow. >>>>>>> >>>>>>> Kasper >>>>>>> >>>>>>> On Feb 1, 2007, at 11:36 AM, Jarrett Byrnes wrote: >>>>>>> >>>>>>>> Hey, all. I'm working on some methods with Rgraphviz to >>>>>>>> plot sem >>>>>> objects (structrual equation models from the sem library) and >>>>>> have >>>>>> run >>>>>> into a problem. It would seem that Rgraphviz is not dealing with >>>>>> edge >>>>>> properties correctly. I've tried the following sample code: >>>>>> set.seed(123) >>>>>>>> V <- letters[1:10] >>>>>>>> M <- 1:4 >>>>>>>> g1 <- randomGraph(V, M, 0.2) >>>>>>>> nAttrs <- list() >>>>>>>> eAttrs <- list() >>>>>>>> z <- strsplit(packageDescription("Rgraphviz")$Description, " ") >>>>>>>> [[1]] z >>>>>> <- z[1:numNodes(g1)] >>>>>>>> names(z) = nodes(g1) >>>>>>>> nAttrs$label <- z >>>>>>>> eAttrs$label <- c("a~h" = "Label 1", "c~h" = "Label 2") >>>>>>>> attrs <- list(node = list(shape = "ellipse", fixedsize = >>>>>>>> FALSE)) >>>>>> plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = >>>>>> attrs) And >>>>>> instead of labeling the edges, they become more angled/ >>>>>> straight and >>>>>> less curved. I've had similar problems with my own functions >>>>>> that >>>>>> I'm >>>>>> coding. Similarly, when I specify "solid" or "dashed" nothing >>>>>> happens. >>>>>> I'd be happy to send a picture, if you would like. Although >>>>>> making >>>>>> solid or dashed a label instead of a style tends to again >>>>>> straighten >>>>>> the edges. >>>>>>>> FYI, I'm running R 2.4.1 and Rgraphviz 1.12.3 (the most >>>>>>>> current) >>>>>>>> and >>>>>> the proper version of xgvis that's needed to install this >>>>>> version of >>>>>> Rgraphviz. All of this is on a mac running OSX 10.4.8. >>>>>>>> Any clue why this might be happening/is there a fix? >>>>>>>> -Jarrett >>>>>>>> ---------------------------------------- >>>>>>>> Jarrett Byrnes >>>>>>>> Population Biology Graduate Group, UC Davis >>>>>>>> Bodega Marine Lab >>>>>>>> 707-875-1969 >>>>>>>> http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml >>>>>>>> [[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 >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 >>>>>>> >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 This is all obvious from the GDB session I gave the output of: the attributes are set for the Ragraph object in C. After Graphviz has done the rendering they are not copied into the laidout structure, which we then copy into R in the slots of the Ragraph R object. This works for the node labels which I have quite some experience debugging. So it seems to be a Graphviz issue - or we need to get the labels from another part of the laidout obect (but that would then be different from how we handle the node labels). A comment to this: >>>> In case of the latter, I would try to change the following line (in >>>> doLayout.c) from >>>> if ( edge->u.label != NULL ) >>>> to >>>> if ( agget(edge, "label") ) >>>> just to see what happens... We need the original line. In case it is a pointer to NULL, we cannot interrogate substructures of it, like we do below. Jarrett: there is not much you can do at this moment, and do not expect the problem to be fixed this week. It seems like some rather strange stuff is happening on the Mac. I will ask on the Graphviz email list. Kasper On Feb 5, 2007, at 8:53 AM, Jarrett Byrnes wrote: > Nope, I get something very different > > > AgEdge(g2)[[5]]@txtLabel at labelText > character(0) > > AgEdge(g2)[[10]]@txtLabel at labelText > character(0) > > Given what I saw looking at the edgeAttrs of the Ragraph object > itself, (namely, Null), I'm guessing that the problem is there. > This may also be why edge style (solid v. dashed) wasn't getting > picked up. Why it is different on linux instead of a mac, I am > uncertain, unless there are different binaries in the Bioconductor > archive. > > But I could be wrong about that, as I don't know the code. > > On Feb 5, 2007, at 8:21 AM, Li.Long at isb-sib.ch wrote: > >> >> Hi, >> >> Here's what I got on my Linux: >> >>> g2 <- plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = >>> attrs) >>> AgEdge(g2)[[5]]@txtLabel at labelText >> [1] "Label 1" >>> AgEdge(g2)[[10]]@txtLabel at labelText >> [1] "Label 2" >> >> Index 5/10 are the two edges you set labels on. For me, they are >> "Label >> 1" and "Label 2" as you set. I would double check on Mac to see >> if they >> are >> like that. >> >> If you do see these label texts, then the problem has more to do with >> rendering. Various things could go wrong: (just my speculation) a >> wrong >> color could make text invisible, function "lines" could have trouble >> dealing with labels, function "plot" might have problem on Mac, etc. >> >> If you don't see these label texts, we need to look further into >> how these >> labels are handled in Rgraphviz/graphviz on Mac. >> >> Li >> >> >>> I'm unclear as to what you mean by object g. I'm assuming that you >>> mean the Ragraph object generated by plot. So, I did the following, >>> after running the previous code from my first post: >>> >>>> g2<-plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = attrs) >>>> >>>> g<-layoutGraph(g2) >>>> AgEdge(g) >>> [[1]] >>> An edge between e and b with 1 BezierCurve objects: >>> 257,706 223,656 121,506 87,456 >>> >>> [[2]] >>> An edge between f and b with 1 BezierCurve objects: >>> 268,704 268,653 268,508 268,457 >>> >>> [[3]] >>> An edge between j and b with 1 BezierCurve objects: >>> 272,704 293,618 382,247 407,141 >>> >>> [[4]] >>> An edge between j and e with 1 BezierCurve objects: >>> 91,423 147,370 328,196 391,135 >>> >>> [[5]] >>> An edge between j and i with 1 BezierCurve objects: >>> 539,421 517,367 451,205 425,140 >>> >>> >>> Note, however, the following >>> >>>> g2$edgeAttrs >>> NULL >>> >>> >>> >>> >>> On Feb 5, 2007, at 2:13 AM, Li.Long at isb-sib.ch wrote: >>> >>>> >>>> On my linux (R2.4 + graphviz 2.8/2.12), the edge labels DO show >>>> up... >>>> >>>> I don't have Mac on hand... On the other hand, I don't see any >>>> codes that >>>> are Mac-ed or Apple-ed in either Rgraphviz or graphviz. >>>> >>>> You can do (in R): g1 <- layoutGraph(g), then look at g1's AgEdge >>>> info to >>>> see if the label info are available. If they are, then the >>>> problem is >>>> likely to be in rendering on Mac, other wise, it's more to do with >>>> retrieving label info. >>>> >>>> In case of the latter, I would try to change the following line (in >>>> doLayout.c) from >>>> if ( edge->u.label != NULL ) >>>> to >>>> if ( agget(edge, "label") ) >>>> just to see what happens... >>>> >>>> Li >>>> >>>> >>>> >>>> >>>>> As Jarrett says, this does not explain why the labels don't >>>>> show up. >>>>> >>>>> Jarrett: could you do a >>>>> R> graphvizVersion() >>>>> for me. And are you on an Intel or PPC machine? >>>>> >>>>> I have spent some time in GDB and I am stuck for the moment. >>>>> >>>>> Notes for Li and me: >>>>> R> library(Rgraphviz) >>>>> gdb> break getEdgeLocs >>>>> run Jarrett's example >>>>> gdb> break 124 >>>>> gdb> cont >>>>> (continue 5 times I think). Now we should be at the first edge >>>>> with a >>>>> label, it has the attribute set correctly: >>>>> >>>>> (gdb) p agget(edge, "label") >>>>> $19 = 0x2113cac "Label 1" >>>>> >>>>> But the label is not reflected in the laidout structure, >>>>> instead of a >>>>> textlabel we get a pointer to NULL: >>>>> >>>>> (gdb) p edge->u.label >>>>>$20 = (textlabel_t *) 0x0 >>>>> >>>>> I am at a loss here, running Graphviz 2.12 on Mac PPC. Do you >>>>> see the >>>>> same Li? Perhaps there have been some changes in how to read the >>>>> labels? Anyway, bedtime. >>>>> >>>>> Kasper >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Feb 2, 2007, at 11:52 AM, Jarrett Byrnes wrote: >>>>> >>>>>> I see. So, lty (aka style in the Rgraphviz documentataion - or >>>>>> should one use $lty) just doesn't work yet? That still does not >>>>>> explain why labels are not showing up. >>>>>> >>>>>> On Feb 2, 2007, at 1:43 AM, Li.Long at isb-sib.ch wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> Some attributes affect layout, while others don't. For edges, >>>>>>> "label"-attribute does affect layout, as documented by graphviz. >>>>>>> That's >>>>>>> why you see the edges are plotted differently after adding >>>>>>> labels. >>>>>>> >>>>>>> The attribute for line type, "lty" in Ragraph-class, is not >>>>>>> retrieved from >>>>>>> graphviz at present, so it does not have any effect. >>>>>>> >>>>>>> Some newly added functions (in devel branch) allow you to see a >>>>>>> nicely >>>>>>> rendered graph by using "toFile" function to output the graph >>>>>>> to a >>>>>>> file >>>>>>> (.svg, .ps, etc.). This function invokes the renderer from >>>>>>> graphviz and >>>>>>> honors many more attributes nicely. >>>>>>> >>>>>>> The work is underway to render the graphs (laid out by graphviz) >>>>>>> better: >>>>>>> to honor more attributes, to honor them better. >>>>>>> >>>>>>> Li >>>>>>> >>>>>>> >>>>>>>> I can confirm the problem. I'll have a look at the source code >>>>>>>> today or >>>>>>> (more likely) tomorrow. >>>>>>>> >>>>>>>> Kasper >>>>>>>> >>>>>>>> On Feb 1, 2007, at 11:36 AM, Jarrett Byrnes wrote: >>>>>>>> >>>>>>>>> Hey, all. I'm working on some methods with Rgraphviz to >>>>>>>>> plot sem >>>>>>> objects (structrual equation models from the sem library) and >>>>>>> have >>>>>>> run >>>>>>> into a problem. It would seem that Rgraphviz is not dealing >>>>>>> with >>>>>>> edge >>>>>>> properties correctly. I've tried the following sample code: >>>>>>> set.seed(123) >>>>>>>>> V <- letters[1:10] >>>>>>>>> M <- 1:4 >>>>>>>>> g1 <- randomGraph(V, M, 0.2) >>>>>>>>> nAttrs <- list() >>>>>>>>> eAttrs <- list() >>>>>>>>> z <- strsplit(packageDescription("Rgraphviz")$Description, >>>>>>>>> " ") >>>>>>>>> [[1]] z >>>>>>> <- z[1:numNodes(g1)] >>>>>>>>> names(z) = nodes(g1) >>>>>>>>> nAttrs$label <- z >>>>>>>>> eAttrs$label <- c("a~h" = "Label 1", "c~h" = "Label 2") >>>>>>>>> attrs <- list(node = list(shape = "ellipse", fixedsize = >>>>>>>>> FALSE)) >>>>>>> plot(g1, nodeAttrs = nAttrs, edgeAttrs = eAttrs, attrs = >>>>>>> attrs) And >>>>>>> instead of labeling the edges, they become more angled/ >>>>>>> straight and >>>>>>> less curved. I've had similar problems with my own functions >>>>>>> that >>>>>>> I'm >>>>>>> coding. Similarly, when I specify "solid" or "dashed" nothing >>>>>>> happens. >>>>>>> I'd be happy to send a picture, if you would like. Although >>>>>>> making >>>>>>> solid or dashed a label instead of a style tends to again >>>>>>> straighten >>>>>>> the edges. >>>>>>>>> FYI, I'm running R 2.4.1 and Rgraphviz 1.12.3 (the most >>>>>>>>> current) >>>>>>>>> and >>>>>>> the proper version of xgvis that's needed to install this >>>>>>> version of >>>>>>> Rgraphviz. All of this is on a mac running OSX 10.4.8. >>>>>>>>> Any clue why this might be happening/is there a fix? >>>>>>>>> -Jarrett >>>>>>>>> ---------------------------------------- >>>>>>>>> Jarrett Byrnes >>>>>>>>> Population Biology Graduate Group, UC Davis >>>>>>>>> Bodega Marine Lab >>>>>>>>> 707-875-1969 >>>>>>>>> http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml >>>>>>>>> [[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 >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> 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 >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>>> >>>
0
Entering edit mode
> Nope, I get something very different > > > > character(0) > > AgEdge(g2)[[10]]@txtLabel at labelText > character(0) > > Given what I saw looking at the edgeAttrs of the Ragraph object > itself, (namely, Null), I'm guessing that the problem is there. This > may also be why edge style (solid v. dashed) wasn't getting picked The problem with "lty" is different from this, we didn't even try to set that entry. Here we do try, but don't get it right. > up. Why it is different on linux instead of a mac, I am uncertain, > unless there are different binaries in the Bioconductor archive. Kasper, I see this problem on a 64-bit Linux machine as well. So this might be a 64-bit vs. 32-bit issue. The size of a pointer is different on 64-bit machine vs. 32-bit machine, I'd pay some attention to that, since we are looking at the pointers here... I'll take a closer look at it tomorrow. Li
0
Entering edit mode
On Feb 5, 2007, at 9:22 AM, Li.Long at isb-sib.ch wrote: >> Nope, I get something very different >> >>> >> character(0) >>> AgEdge(g2)[[10]]@txtLabel at labelText >> character(0) >> >> Given what I saw looking at the edgeAttrs of the Ragraph object >> itself, (namely, Null), I'm guessing that the problem is there. This >> may also be why edge style (solid v. dashed) wasn't getting picked > > The problem with "lty" is different from this, we didn't even try > to set > that entry. Here we do try, but don't get it right. > >> up. Why it is different on linux instead of a mac, I am uncertain, >> unless there are different binaries in the Bioconductor archive. > > Kasper, > > I see this problem on a 64-bit Linux machine as well. So this > might be a > 64-bit vs. 32-bit issue. > > The size of a pointer is different on 64-bit machine vs. 32-bit > machine, > I'd pay some attention to that, since we are looking at the pointers > here... There is also the endian issue on the PPC (I am on a 32 bit machine) > I'll take a closer look at it tomorrow. It is rather bewildering. I have quite a lot of experience of looking at how _node_ labels are handled in graphviz' C structures, and in this case the edge labels are certainly behaving differently. Of course, I guess edge labels are not used as much, so it could be a bug somewhere. The fact you see it on 64 bit Linux is at least a bit comforting :) I guess it is using Graphviz 2.12? Like I just wrote: I'll follow up on the Graphviz list later today. Kasper > Li >
0
Entering edit mode
A fix has been found to the problem reported by Jarrett: the fact that edge labels are not showing up on Mac (and possibly 64bit Linux as well as reported by Li). Unfortunately the fix is distinctively not nice :) I have only tested this on Graphviz 2.12 on a Mac G4. You need to modify the Graphviz header files which usually (if you have a default installation) resides in /usr/local/include/graphviz The file in question is called logic.h At the start of the file, just below the lines #ifndef GV_LOGIC_H #define GV_LOGIC_H (which are at lines 17 and 18 in my installation), add the two lines #define HAVE_BOOL 1 #define HAVE_STDBOOL_H 1 (you will probably need to have superuser privileges to do so, on a Mac do # sudo pico logic.h ) And reinstall Rgraphviz from source (you do not need to recompile Graphviz, but you need to recompile Rgraphviz). I am very curious if this works with 1) Simon's Graphviz-2.8 binary from r.research.att.com 2) 64bit Linux 3) Intel Mac (not sure if there was a problem to begin with on that platform) so please send me an email if you try this. For background, read the post by Emden R. Gansner on the Graphviz- interest email-list. Apparently they were being a bit too smart regarding the use of bool, which on Apple's machines have sizeof (bool) = 4. Kasper On Feb 5, 2007, at 9:28 AM, Kasper Daniel Hansen wrote: > > On Feb 5, 2007, at 9:22 AM, Li.Long at isb-sib.ch wrote: > >>> Nope, I get something very different >>> >>>> >>> character(0) >>>> AgEdge(g2)[[10]]@txtLabel at labelText >>> character(0) >>> >>> Given what I saw looking at the edgeAttrs of the Ragraph object >>> itself, (namely, Null), I'm guessing that the problem is there. >>> This >>> may also be why edge style (solid v. dashed) wasn't getting picked >> >> The problem with "lty" is different from this, we didn't even try >> to set >> that entry. Here we do try, but don't get it right. >> >>> up. Why it is different on linux instead of a mac, I am uncertain, >>> unless there are different binaries in the Bioconductor archive. >> >> Kasper, >> >> I see this problem on a 64-bit Linux machine as well. So this >> might be a >> 64-bit vs. 32-bit issue. >> >> The size of a pointer is different on 64-bit machine vs. 32-bit >> machine, >> I'd pay some attention to that, since we are looking at the pointers >> here... > > There is also the endian issue on the PPC (I am on a 32 bit machine) > >> I'll take a closer look at it tomorrow. > > It is rather bewildering. I have quite a lot of experience of looking > at how _node_ labels are handled in graphviz' C structures, and in > this case the edge labels are certainly behaving differently. Of > course, I guess edge labels are not used as much, so it could be a > bug somewhere. > > The fact you see it on 64 bit Linux is at least a bit comforting :) I > guess it is using Graphviz 2.12? > > Like I just wrote: I'll follow up on the Graphviz list later today. > > Kasper > > >> Li >> > > _______________________________________________ > 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
0
Entering edit mode
I believe I have been a bit quick. I should be able to include the fix in the autoconfigure script of Rgraphviz, so don't go and apply the stuff below, unless you have a problem with command-line Graphviz or other applications using Graphviz. Hopefully this will be nailed down tonight. Kasper On Feb 15, 2007, at 7:56 PM, Kasper Daniel Hansen wrote: > A fix has been found to the problem reported by Jarrett: the fact > that edge labels are not showing up on Mac (and possibly 64bit Linux > as well as reported by Li). > > Unfortunately the fix is distinctively not nice :) I have only tested > this on Graphviz 2.12 on a Mac G4. You need to modify the Graphviz > header files which usually (if you have a default installation) > resides in > /usr/local/include/graphviz > The file in question is called > logic.h > > At the start of the file, just below the lines > > #ifndef GV_LOGIC_H > #define GV_LOGIC_H > > (which are at lines 17 and 18 in my installation), add the two lines > > #define HAVE_BOOL 1 > #define HAVE_STDBOOL_H 1 > > (you will probably need to have superuser privileges to do so, on a > Mac do > # sudo pico logic.h > ) > > And reinstall Rgraphviz from source (you do not need to recompile > Graphviz, but you need to recompile Rgraphviz). > > I am very curious if this works with > 1) Simon's Graphviz-2.8 binary from r.research.att.com > 2) 64bit Linux > 3) Intel Mac (not sure if there was a problem to begin with on that > platform) > so please send me an email if you try this. > > For background, read the post by Emden R. Gansner on the Graphviz- > interest email-list. Apparently they were being a bit too smart > regarding the use of bool, which on Apple's machines have sizeof > (bool) = 4. > > Kasper > > On Feb 5, 2007, at 9:28 AM, Kasper Daniel Hansen wrote: > >> >> On Feb 5, 2007, at 9:22 AM, Li.Long at isb-sib.ch wrote: >> >>>> Nope, I get something very different >>>> >>>>> >>>> character(0) >>>>> AgEdge(g2)[[10]]@txtLabel at labelText >>>> character(0) >>>> >>>> Given what I saw looking at the edgeAttrs of the Ragraph object >>>> itself, (namely, Null), I'm guessing that the problem is there. >>>> This >>>> may also be why edge style (solid v. dashed) wasn't getting picked >>> >>> The problem with "lty" is different from this, we didn't even try >>> to set >>> that entry. Here we do try, but don't get it right. >>> >>>> up. Why it is different on linux instead of a mac, I am uncertain, >>>> unless there are different binaries in the Bioconductor archive. >>> >>> Kasper, >>> >>> I see this problem on a 64-bit Linux machine as well. So this >>> might be a >>> 64-bit vs. 32-bit issue. >>> >>> The size of a pointer is different on 64-bit machine vs. 32-bit >>> machine, >>> I'd pay some attention to that, since we are looking at the pointers >>> here... >> >> There is also the endian issue on the PPC (I am on a 32 bit machine) >> >>> I'll take a closer look at it tomorrow. >> >> It is rather bewildering. I have quite a lot of experience of looking >> at how _node_ labels are handled in graphviz' C structures, and in >> this case the edge labels are certainly behaving differently. Of >> course, I guess edge labels are not used as much, so it could be a >> bug somewhere. >> >> The fact you see it on 64 bit Linux is at least a bit comforting :) I >> guess it is using Graphviz 2.12? >> >> Like I just wrote: I'll follow up on the Graphviz list later today. >> >> Kasper >> >> >>> Li >>> >> >> _______________________________________________ >> 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 > > _______________________________________________ > 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
0
Entering edit mode
Ok, the fixes are incorporated in Rgraphviz 1.13.25, which have been committed (and which hopefully works on the other platforms). It may take a while for it to appear on the website. You should just install this version to fix the edge label problem. Kasper On Feb 15, 2007, at 9:03 PM, Kasper Daniel Hansen wrote: > I believe I have been a bit quick. I should be able to include the > fix in the autoconfigure script of Rgraphviz, so don't go and apply > the stuff below, unless you have a problem with command-line Graphviz > or other applications using Graphviz. Hopefully this will be nailed > down tonight. > > Kasper > > On Feb 15, 2007, at 7:56 PM, Kasper Daniel Hansen wrote: > >> A fix has been found to the problem reported by Jarrett: the fact >> that edge labels are not showing up on Mac (and possibly 64bit Linux >> as well as reported by Li). >> >> Unfortunately the fix is distinctively not nice :) I have only tested >> this on Graphviz 2.12 on a Mac G4. You need to modify the Graphviz >> header files which usually (if you have a default installation) >> resides in >> /usr/local/include/graphviz >> The file in question is called >> logic.h >> >> At the start of the file, just below the lines >> >> #ifndef GV_LOGIC_H >> #define GV_LOGIC_H >> >> (which are at lines 17 and 18 in my installation), add the two lines >> >> #define HAVE_BOOL 1 >> #define HAVE_STDBOOL_H 1 >> >> (you will probably need to have superuser privileges to do so, on a >> Mac do >> # sudo pico logic.h >> ) >> >> And reinstall Rgraphviz from source (you do not need to recompile >> Graphviz, but you need to recompile Rgraphviz). >> >> I am very curious if this works with >> 1) Simon's Graphviz-2.8 binary from r.research.att.com >> 2) 64bit Linux >> 3) Intel Mac (not sure if there was a problem to begin with on that >> platform) >> so please send me an email if you try this. >> >> For background, read the post by Emden R. Gansner on the Graphviz- >> interest email-list. Apparently they were being a bit too smart >> regarding the use of bool, which on Apple's machines have sizeof >> (bool) = 4. >> >> Kasper >> >> On Feb 5, 2007, at 9:28 AM, Kasper Daniel Hansen wrote: >> >>> >>> On Feb 5, 2007, at 9:22 AM, Li.Long at isb-sib.ch wrote: >>> >>>>> Nope, I get something very different >>>>> >>>>>> >>>>> character(0) >>>>>> AgEdge(g2)[[10]]@txtLabel at labelText >>>>> character(0) >>>>> >>>>> Given what I saw looking at the edgeAttrs of the Ragraph object >>>>> itself, (namely, Null), I'm guessing that the problem is there. >>>>> This >>>>> may also be why edge style (solid v. dashed) wasn't getting picked >>>> >>>> The problem with "lty" is different from this, we didn't even try >>>> to set >>>> that entry. Here we do try, but don't get it right. >>>> >>>>> up. Why it is different on linux instead of a mac, I am >>>>> uncertain, >>>>> unless there are different binaries in the Bioconductor archive. >>>> >>>> Kasper, >>>> >>>> I see this problem on a 64-bit Linux machine as well. So this >>>> might be a >>>> 64-bit vs. 32-bit issue. >>>> >>>> The size of a pointer is different on 64-bit machine vs. 32-bit >>>> machine, >>>> I'd pay some attention to that, since we are looking at the >>>> pointers >>>> here... >>> >>> There is also the endian issue on the PPC (I am on a 32 bit machine) >>> >>>> I'll take a closer look at it tomorrow. >>> >>> It is rather bewildering. I have quite a lot of experience of >>> looking >>> at how _node_ labels are handled in graphviz' C structures, and in >>> this case the edge labels are certainly behaving differently. Of >>> course, I guess edge labels are not used as much, so it could be a >>> bug somewhere. >>> >>> The fact you see it on 64 bit Linux is at least a bit >>> comforting :) I >>> guess it is using Graphviz 2.12? >>> >>> Like I just wrote: I'll follow up on the Graphviz list later today. >>> >>> Kasper >>> >>> >>>> Li >>>> >>> >>> _______________________________________________ >>> 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 >> >> _______________________________________________ >> 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 > > _______________________________________________ > 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
0
Entering edit mode
Just to clarify: I goofed when reporting the label problem on Linux 64-bit machine. It works well as-is. Li > A fix has been found to the problem reported by Jarrett: the fact > that edge labels are not showing up on Mac (and possibly 64bit Linux > as well as reported by Li). > > Unfortunately the fix is distinctively not nice :) I have only tested > this on Graphviz 2.12 on a Mac G4. You need to modify the Graphviz > header files which usually (if you have a default installation) > resides in > /usr/local/include/graphviz > The file in question is called > logic.h > > At the start of the file, just below the lines > > #ifndef GV_LOGIC_H > #define GV_LOGIC_H > > (which are at lines 17 and 18 in my installation), add the two lines > > #define HAVE_BOOL 1 > #define HAVE_STDBOOL_H 1 > > (you will probably need to have superuser privileges to do so, on a > Mac do > # sudo pico logic.h > ) > > And reinstall Rgraphviz from source (you do not need to recompile > Graphviz, but you need to recompile Rgraphviz). > > I am very curious if this works with > 1) Simon's Graphviz-2.8 binary from r.research.att.com > 2) 64bit Linux > 3) Intel Mac (not sure if there was a problem to begin with on that > platform) > so please send me an email if you try this. > > For background, read the post by Emden R. Gansner on the Graphviz- > interest email-list. Apparently they were being a bit too smart > regarding the use of bool, which on Apple's machines have sizeof > (bool) = 4. > > Kasper > > On Feb 5, 2007, at 9:28 AM, Kasper Daniel Hansen wrote: > >> >> On Feb 5, 2007, at 9:22 AM, Li.Long at isb-sib.ch wrote: >> >>>> Nope, I get something very different >>>> >>>>> >>>> character(0) >>>>> AgEdge(g2)[[10]]@txtLabel at labelText >>>> character(0) >>>> >>>> Given what I saw looking at the edgeAttrs of the Ragraph object >>>> itself, (namely, Null), I'm guessing that the problem is there. >>>> This >>>> may also be why edge style (solid v. dashed) wasn't getting picked >>> >>> The problem with "lty" is different from this, we didn't even try >>> to set >>> that entry. Here we do try, but don't get it right. >>> >>>> up. Why it is different on linux instead of a mac, I am uncertain, >>>> unless there are different binaries in the Bioconductor archive. >>> >>> Kasper, >>> >>> I see this problem on a 64-bit Linux machine as well. So this >>> might be a >>> 64-bit vs. 32-bit issue. >>> >>> The size of a pointer is different on 64-bit machine vs. 32-bit >>> machine, >>> I'd pay some attention to that, since we are looking at the pointers >>> here... >> >> There is also the endian issue on the PPC (I am on a 32 bit machine) >> >>> I'll take a closer look at it tomorrow. >> >> It is rather bewildering. I have quite a lot of experience of looking >> at how _node_ labels are handled in graphviz' C structures, and in >> this case the edge labels are certainly behaving differently. Of >> course, I guess edge labels are not used as much, so it could be a >> bug somewhere. >> >> The fact you see it on 64 bit Linux is at least a bit comforting :) I >> guess it is using Graphviz 2.12? >> >> Like I just wrote: I'll follow up on the Graphviz list later today. >> >> Kasper >> >> >>> Li >>> >> >> _______________________________________________ >> 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 >