Skip to content

Instantly share code, notes, and snippets.

@fredpyo
fredpyo / pydot_001.py
Created December 10, 2014 21:42
pydot 001
# -*- coding: utf-8 -*-
"""
pydot example 1
@author: Federico Cáceres
@url: http://pythonhaven.wordpress.com/2009/12/09/generating_graphs_with_pydot
"""
import pydot # import pydot or you're not going to get anywhere my friend :D
# first you create a new graph, you do that with pydot.Dot()
graph = pydot.Dot(graph_type='graph')
@fredpyo
fredpyo / pydot 002.py
Created December 10, 2014 21:44
pydot 002
# -*- coding: utf-8 -*-
"""
pydot example 2
@author: Federico Cáceres
@url: http://pythonhaven.wordpress.com/2009/12/09/generating_graphs_with_pydot
"""
import pydot
# this time, in graph_type we specify we want a DIrected GRAPH
graph = pydot.Dot(graph_type='digraph')
@fredpyo
fredpyo / buggy-path.svg
Last active November 21, 2016 21:07
Buggy path
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.