#include "boost/graph/graphviz.hpp"

struct myVertex_t {
	int color;
};

typedef boost::adjacency_list<
	boost::vecS,                   // edge container
	boost::vecS,                   // vertex container
	boost::undirectedS,            // type of graph
	myVertex_t,                    // vertex properties
	boost::property<               // edge properties
		boost::edge_color_t,             // ???
		boost::default_color_type        // enum, holds 5 colors
		>
	> myGraph_t;

template<typename graph_t, typename vertex_t>
void RenderGraph( const graph_t& g )
{
	boost::dynamic_properties dp;
	dp.property( "color",   boost::get( &vertex_t::color,    g ) );
	dp.property( "node_id", boost::get( boost::vertex_index, g ) );
	boost::write_graphviz_dp( std::cout, g, dp );
}

int main()
{
	myGraph_t g;
	boost::add_edge(0, 1, g);

	myGraph_t::vertex_iterator it = vertices(g).first;
	g[*it++].color = 42;
	g[*it++].color = 43;

	RenderGraph<myGraph_t,myVertex_t>( g );
}

