Discussion:
[graphviz-interest] Borders around sub-graphs
paul womack
2015-05-22 13:04:39 UTC
Permalink
I'm using ccomps and gvpack to sort a large pile
of data into connected subgraphs.

cat data.dot | ccomps -x | dot | gvpack -g | neato -s -n2 -Tsvg > tree.svg

(I'm viewing with Inkscape)

This is working.

But I'd like to put a HTML-like "border" around each sub graph.

I've looked at gvpack, and -G looks useful;

-Gname=value
Specifies attributes to be added to the resulting union graph. For example, this can be used to specify a graph label.

But I can't find a border (or similar) attribute for graphs;

http://www.graphviz.org/doc/info/attrs.html

Am I missing something obvious?

BugBear
_______________________________________________
graphviz-***@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/graphviz-interest
Emden R. Gansner
2015-05-23 15:45:49 UTC
Permalink
Post by paul womack
I'm using ccomps and gvpack to sort a large pile
of data into connected subgraphs.
cat data.dot | ccomps -x | dot | gvpack -g | neato -s -n2 -Tsvg > tree.svg
(I'm viewing with Inkscape)
This is working.
But I'd like to put a HTML-like "border" around each sub graph.
I've looked at gvpack, and -G looks useful;
-Gname=value
Specifies attributes to be added to the resulting union graph. For
example, this can be used to specify a graph label.
But I can't find a border (or similar) attribute for graphs;
http://www.graphviz.org/doc/info/attrs.html
Am I missing something obvious?
BugBear
_______________________________________________
http://lists.research.att.com/mailman/listinfo/graphviz-interest
Not quite sure what you mean by putting an HTML-like border around each
subgraph. However, if you would accept the type of
of border that gets placed around clusters, the trick is to wrap each
graph in a cluster. That can be done as follows:

ccomps -x data.dot | gvpr -c 'BEGIN{$tgtname="cluster"}N[1]E[1]' |
dot | gvpack -g | neato -s -n2 -Tsvg > tree.svg

You can modify the gvpr script to change the display attributes, such as
color and width, of the border.

Emden

_______________________________________________
graphviz-***@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/graphviz-interest
paul womack
2015-05-26 15:17:57 UTC
Permalink
Not quite sure what you mean by putting an HTML-like border around each subgraph. However, if you would accept the type of
ccomps -x data.dot | gvpr -c 'BEGIN{$tgtname="cluster"}N[1]E[1]' | dot | gvpack -g | neato -s -n2 -Tsvg > tree.svg
You can modify the gvpr script to change the display attributes, such as color and width, of the border.
I gave that a try, and it made a hell of a mess of my data - it certainly
did more than just put a box round the sub-graphs. I've peeked at the
gvpr manual, and it looks substantial.

Could you check your suggestion for simple typos before I dig deeper?

BugBear
_______________________________________________
graphviz-***@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/graphviz-interest

Loading...