Graphviz's HTML-like labels documentation suggests I can have a node labeled Uₓ with this .dot file:
digraph G {
U [label=<U<SUB>X</SUB>>];
U->X
}
Unfortunately, the graph produced shows a node with UX instead of Uₓ:
Am I missing something to make the X in Uₓ subscript?
UPDATE: I'm outputting PNG images with dot mygraph.dot -Tpng -o mygraph.png and receive no warnings or errors. The version is:
$ dot -V
dot - graphviz version 2.40.1 (20161225.0304)
Installed with brew on macOS
UPDATE 2: I tried to output SVG with -Tsvg instead of PNG with -Tpng and I do get a subscript X, sort of. The font size of X is exactly the same as U, just shifted down a little. Why is this so bad?
I was not satisfied with my comment so I'll try to give a bit a better overview with what I see (so no answer, but just a summary).
For this overview I used the following input:
digraph G {
U [label=<U<sub>x</sub>>];
U->X
V [label=<U<SUB>x</SUB>>];
V->X
V1 [label=<Ux>];
V1->X
W [label=<U<sub>X</sub>>];
W->X
Y [label=<U<SUB>X</SUB>>];
Y->X
Y1 [label=<UX>];
Y1->X
}
and the following versions of dot:
Windows: dot - graphviz version 2.38.0 (20140413.2041)
Cygwin: dot - graphviz version 2.40.1 (20161225.0304)
The results are as follows:
Windows png:
Windows svg:
Cygwin png:
Cygwin svg:
Related
I am using graphviz to create a png file, however when I run my the code, after it generates the image, I try to open the file only to receive a message that either the image file type (png) is unsupported, which I tested using other pngs so I know that can't be the case, or that the file is corrupted. The code I'm running is as follows:
dot -Tpng test.dot -o test.png
with test.dot being:
graph G {
fontname="Helvetica,Arial,sans-serif"
node [fontname="Helvetica,Arial,sans-serif"]
edge [fontname="Helvetica,Arial,sans-serif"]
layout=fdp
"Infinity Blade" -- "Undertow";
"Infinity Blade" -- "Shadow Complex";
.
.
.
"Calvin and Hobbes" -- "XKCD";
"XKCD" -- "Enders Game";
}
When running the code I did also receive two messages, however neither of them had resulted in a corrupted file the first time I received them:
Warning: Overlap value "prism" unsupported - ignored
dot: graph is too large for cairo-renderer bitmaps. Scaling by 0.404306 to fit
I have graphviz installed on a linux VM. I am automatically converting .apt into .dot files using APT. I draw these with graphviz and the dot command. But it keeps showing the xlabels, which are set automatically by APT. Is there a way to surpress these xlabels, so they dont show ?
-Gforcelabels=false didn't work and i could not change the labels with -Exlabel
dot -Nxlabel="" -Exlabel="" -T... should(?) work, but it does not! I consider this a bug, not a feature.
This does work:
gvpr -c 'E{$.xlabel=""}N{$.xlabel=""}' file.dot |dot -Tsvg >file.svg
I cannot open the attached dot file in gvEdit.
I tried to convert it to png file
dot -Tpng final.dot > finalgraph.png
it gives me the following problem:
dot: graph is too large for cairo-renderer bitmaps. Scaling by 0.311296 to fit
dot: failure to create cairo surface: out of memory
My purpose is only to view the dot file, how should I resolve it?
The dot file is here:
https://www.dropbox.com/s/vt2q653x2x9jjbj/final.dot?dl=0
I just started using GRASS GIS 7.0.0beta2. I want to use R in GRASS and vise versa. Following the instructions from here, when I bring the WinGRASS-windows console in front and type R for opening a R-session (command line mode) inside a GRASS-session, I get the following error:
sh.exe": R: command not found
How can I configure R and GRASS so that I can use R in GRASS and GRASS in R. I'm on Windows 7 with R 3.1.0 and GRASS GIS 7.0.0beta2.
I'm a Linux user, so I can't try it, but it seems to me that R bins directory is not in your PATH.
To test it, open a command line (should be cmd.exe) and try
R
If the output is the same as above, then add R bin directory to PATH, so you can call R from whatever directory you want.
Check one of the following links and apply it to the directory where R bins reside.
HTH, let me know. Luca
RGL supports writing DOT files from a graph, is it possible to create a graph from a DOT file?
(Obviously I can parse the DOT file myself and create a graph, but I'm wondering if this functionality exists already).
First you have to install graphviz which gives you the 'dot' command.
Then you can run
dot -Tpng graph.dot > output.png
but I found that after installing dot the rgl method write_to_graphic_file automatically writes the image if you do something like
graph_obj.write_to_graphic_file('png')