Rgraphviz - exported (toFile) dot file loses colour and label information
0
0
Entering edit mode
@sterlinggunn01-23069
Last seen 4 months ago
United States

I am working in RStudio on a Mac Studio M2.

My code produces a graphNEL object, with colour coded nodes and node labels. The graph renders properly to the 'Plots' tab, and exports properly to a pdf file. (One problem is the pdf renders the fonts incorrectly. The Graphviz team recommended exporting the 'dot' file, and then plotting it with a command line.) When I use the proposed fix, I get the proper fonts, but all the node colour, label, and shape information is lost (it is not in the dot file).

Here is the command line used to process the dot file

              dot -Gsize="10,10" -Tpdf fred.dot -o fred.pdf

The first three lines are the Rgraphviz code I use to render the graphNEL object.

The fourth and fifth line export the graph to a 'dot' file. The 'dot' file has no information regarding node shape, colour, or label. I am uncertain why this information is lost.

graphRenderInfo(g1,c(nodesep=.5,width=60)) renderGraph(g1) ``` gt@graph <- g1

ag <- agopenSimple(g1,name="fred") toFile(ag,filename="fred.dot")

Any help would be much appreciated. Sterling

Rgraphviz • 197 views
ADD COMMENT

Login before adding your answer.

Traffic: 482 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