I have a graph file to draw using "dot". I don't want to show any label for any node. I am wondering how to do this without specifying a configuration for each node since there are too many nodes in the graph.
Asked
Active
Viewed 1.0k times
15
-
Have you tried setting the font to nothing, or the font size to 0? – Unapiedra Aug 04 '11 at 07:45
1 Answers
25
Try inserting the following line before all node declarations:
node[label=""];
Of course, nodes which have their label property defined will still have their label displayed.
Also, if I remember correctly, at least one node shapes does not use the label:
node[shape=point]

marapet
- 54,856
- 12
- 170
- 184
-
I took the liberty to add a little demo to your answer. It felt a bit like cheating if I'd posted it as an answer of my own. – Bart Kiers Aug 04 '11 at 09:33
-
I rolled back because that's not what I suggested. there's a difference between specifying a label for a single node and specifying a label for all nodes. – marapet Aug 04 '11 at 09:37
-
ah, apologies. I misread the OP's requirement "any label", which I took as "a certain label" instead of "all labels". – Bart Kiers Aug 04 '11 at 09:39
-
I just tested it, and you're right: `node[label=""]` removes all labels (when placed _before_ the nodes). – Bart Kiers Aug 04 '11 at 09:41