Draw a simple graph structure.
The graph layout is made using graphviz. This macro creates some nodes and edges and change a few graphical attributes on some of them.
{
#if __has_include("TGraphStruct.h")
#else
return new TCanvas(
"c",
"c",800,600);
#endif
}
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
An edge object connecting two nodes which can be added in a TGraphStruct.
A graph node object which can be added in a TGraphStruct.
The Graph Structure is an interface to the graphviz package.
void AddNode(TGraphNode *node)
Add the node "node" in this TGraphStruct.
void Draw(Option_t *option="")
Draw the graph.
void AddEdge(TGraphEdge *edge)
Add the edge "edge" in this TGraphStruct.
- Note
- For this to work, ROOT has to be compiled with gviz ON
- Author
- Olivier Couet
Definition in file graphstruct.C.