Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

எழில் ஓர-முனையம் உருப்பை DOT மொழியில் வரைக #165

Open
arcturusannamalai opened this issue Dec 25, 2015 · 0 comments

Comments

@arcturusannamalai
Copy link
Collaborator

எ.கா

Quickstart

Create a graph object:

>>> from graphviz import Digraph

>>> dot = Digraph(comment='The Round Table')

>>> dot  #doctest: +ELLIPSIS
<graphviz.dot.Digraph object at 0x...>
Add nodes and edges:

>>> dot.node('A', 'King Arthur')
>>> dot.node('B', 'Sir Bedevere the Wise')
>>> dot.node('L', 'Sir Lancelot the Brave')

>>> dot.edges(['AB', 'AL'])
>>> dot.edge('B', 'L', constraint='false')
Check the generated source code:

>>> print(dot.source)  # doctest: +NORMALIZE_WHITESPACE
// The Round Table
digraph {
    A [label="King Arthur"]
    B [label="Sir Bedevere the Wise"]
    L [label="Sir Lancelot the Brave"]
        A -> B
        A -> L
        B -> L [constraint=false]
}
Save and render the source code, optionally view the result:

>>> dot.render('test-output/round-table.gv', view=True)
'test-output/round-table.gv.pdf'

Ref : https://pypi.python.org/pypi/graphviz

Ref : http://matthiaseisen.com/articles/graphviz/
: http://graphviz.org/pdf/dotguide.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant