graph.set_fontsize('12')
graph.get_fontsize()

"""
Explanation: Graph attributes can be manipulated through the set_*() and get_*() methods.
End of explanation
"""


graph.set_node_defaults(fillcolor='blue', style='filled')
graph.get_node_defaults()

"""
Explanation: Defaults can be set for nodes and edges.
End of explanation
"""


node1 = pydot.Node(name='node1', label='My first node', shape='box')
node2 = pydot.Node(name='node2', label='My second node', color='red')
edge = pydot.Edge(src=node1, dst=node2, label='My Edge', style='dotted')

graph.add_node(node1)
graph.add_node(node2)
graph.add_edge(edge)

graph.write('pydot.dot')
graph.write_png('pydot.png')

"""
Explanation: Nodes, edges and subgraphs are added and deleted through the respective add_*() and del_*() methods.
End of explanation
"""


