Seminar
Software Architektur (CPSA-F)
UML-Tag
Termine
Anmeldung
BITPlan
Γber BITPlan
Services
Produkte
Open Source
Impressum
Kontakt
Kontakt
Not logged in
Talk
Contributions
Create account
Log in
Page
Discussion
Edit
Edit source
View history
Refresh
Editing
GraphViz
From BITPlan Wiki
Jump to:
navigation
,
search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Graphviz == === Documentation === * http://www.graphviz.org * http://www.graphviz.org/Documentation/dotguide.pdf * http://www.tonyballantyne.com/graphs.html * http://www.graphviz.org/doc/fontfaq.txt * http://stackoverflow.com/questions/tagged/graphviz * http://graphs.grevian.org/reference ==== Mediawiki Graphviz extension ==== {{Link|target=GraphViz MediaWiki extension}} === Fiddles === * http://sandbox.kidstrythisathome.com/erdos/ * http://www.webgraphviz.com/ === Examples === ==== Graph ==== <source lang='php'> <graphviz format='svg'> graph development { Stakeholder -- Requirements; Requirements -- Samplecases; Requirements -- Model; Model -- Code; } </graphviz> </source> <graphviz format='svg'> graph rq { Stakeholder -- Requirements; Requirements -- Samplecases; Requirements -- Model; Model -- Code; } </graphviz> ==== Hierarchy ==== <source lang='php'> <graphviz> digraph hierarchy { nodesep=1.0 // increases the separation between nodes node [color=Red,fontname=Courier,shape=box] //All nodes will this shape and colour edge [color=Blue, style=dashed] //All the lines look like this Model->{Package1 Package2 System} Package1->{Class1 Class2} System->Subsystem {rank=same;Subsystem Class1 Class2} // Put them on the same level } </graphviz> </source> <graphviz> digraph hierarchy { nodesep=1.0 // increases the separation between nodes node [color=Red,fontname=Courier,shape=box] //All nodes will this shape and colour edge [color=Blue, style=dashed] //All the lines look like this Model->{Package1 Package2 System} Package1->{Class1 Class2} System->Subsystem {rank=same;Subsystem Class1 Class2} // Put them on the same level } </graphviz> ==== HTML labels ==== <source lang='php'> digraph G { "Record" [ label=<<table> <tr> <td>A</td> <td bgcolor='#00CC11'>B</td> </tr> </table> > ]; } </source> <graphviz> digraph G { "Record" [ label=<<table> <tr> <td>A</td> <td bgcolor='#00CC11'>B</td> </tr> </table> > ]; } </graphviz> ==== Images ==== <source lang='php'> <graphviz> digraph tools { graphviz [ label="" tooltip="graphviz" image="GraphVizLogo.png" ] } </graphviz> </source> <graphviz> digraph tools { graphviz [ label="" tooltip="graphviz" image="GraphVizLogo.png" ] } </graphviz> ==== UML ==== <source lang='php'> digraph obj{ nodesep=1.0 // increases the separation between nodes node[shape=record, color="#FF8000", fontname = "Technical"]; rankdir="BT"; teacher [label = "{<f0> Teacher|<f1> name\n |<f2> \n }"]; course [label = "{<f0> Course|<f1>title \n |<f2> \n }"]; student [label = "{<f0> Student|<f1>name \n |<f2> \n }"]; lesson [label = "{<f0> Lesson |<f1> \n |<f2> \n }"]; tutorial [label = "{<f0> Tutorial|<f1> \n |<f2> \n }"]; assessment[label = "{<f0> Assessment|<f1> \n |<f2> \n }"]; coursework [label = "{<f0> Coursework|<f1> \n |<f2> \n }"]; exam [label = "{<f0> Exam|<f1> \n |<f2> \n }"]; teacher->course [dir="forward",arrowhead="none",arrowtail="normal",headlabel=" 1",taillabel=" 1.."]; student->course [dir="forward",arrowhead="none",arrowtail="normal",headlabel=" 1",taillabel=" 1.."]; lesson->course [dir="forward",arrowhead="diamond",arrowtail="normal"]; tutorial->course [dir="forward",arrowhead="diamond",arrowtail="normal"]; assessment->course [dir="forward",arrowhead="diamond",arrowtail="normal"]; coursework->assessment; exam->assessment; {rank=same; teacher course student}; } </source> <graphviz> digraph obj{ nodesep=1.0 // increases the separation between nodes node[shape=record, color="#FF8000", fontname = "Technical"]; rankdir="BT"; teacher [label = "{<f0> Teacher|<f1> name\n |<f2> \n }"]; course [label = "{<f0> Course|<f1>title \n |<f2> \n }"]; student [label = "{<f0> Student|<f1>name \n |<f2> \n }"]; lesson [label = "{<f0> Lesson |<f1> \n |<f2> \n }"]; tutorial [label = "{<f0> Tutorial|<f1> \n |<f2> \n }"]; assessment[label = "{<f0> Assessment|<f1> \n |<f2> \n }"]; coursework [label = "{<f0> Coursework|<f1> \n |<f2> \n }"]; exam [label = "{<f0> Exam|<f1> \n |<f2> \n }"]; teacher->course [dir="forward",arrowhead="none",arrowtail="normal",headlabel=" 1",taillabel=" 1.."]; student->course [dir="forward",arrowhead="none",arrowtail="normal",headlabel=" 1",taillabel=" 1.."]; lesson->course [dir="forward",arrowhead="diamond",arrowtail="normal"]; tutorial->course [dir="forward",arrowhead="diamond",arrowtail="normal"]; assessment->course [dir="forward",arrowhead="diamond",arrowtail="normal"]; coursework->assessment; exam->assessment; {rank=same; teacher course student}; } </graphviz> = Papers = https://www.researchgate.net/publication/3187542_A_Technique_for_Drawing_Directed_Graphs
Summary:
Please note that all contributions to BITPlan Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BITPlan Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:Link
(
edit
)