Hello,
I'm boost newbie and have some problems with write_graphviz function.
I've already asked this question but perhaps with bad subject so i
try again. Sorry if you read this second time.
In write_graphviz function documentation I can read that
PropertyWriter can be used for print both: interior and exterior
properties for each vertex of a graph into the graphviz format file. I
can find some example of printing graph properties stored in property
maps, for example calling:
write_graphviz(std::cout, g, make_label_writer(name));
when the graph have 'name' property map.
but how to do that when storing properies as bundled properies?
I defined following graph:
typedef adjacency_list
On Sunday 09 December 2007 07:10, Michał Nowotka wrote:
In write_graphviz function documentation I can read that PropertyWriter can be used for print both: interior and exterior properties for each vertex of a graph into the graphviz format file. I can find some example of printing graph properties stored in property maps, for example calling:
write_graphviz(std::cout, g, make_label_writer(name));
when the graph have 'name' property map.
but how to do that when storing properies as bundled properies?
I did something like this recently (although I was printing colored edges instead of vertices). See the "vertex_labeler" and "edge_colorer" classes defined in this file: http://cvs.comedi.org/cgi-bin/viewcvs.cgi/libpoet/poet/mutex_grapher.hpp?rev=1.3&view=markup I pass objects of these classes as the third and fourth arguments to write_graphviz. -- Frank
That solved my problem. Thank you very much.
BTW - if you used write_graphviz perhabs you could use gvRenderData or
gvRender too. I'm trying to display rendered graph image but without
storing it in temoprary file. So i found gvRenderData from graphviz
library most suitable to do that. But when i call this function it
simply seems not to be working.
when I type something like that:
write_graphviz(my_stringstream, graf->Get_g());
g = agmemread(const_cast
participants (2)
-
Frank Mori Hess
-
Michał Nowotka