add dot printing
remove unnecessary pydot import
support styles keyword in dotprint
sorted dict printing - better doctests
sort node/edge strings by length
add test_dot.py
atom, polymorphism, and depth
dotprint traverse handles non_Basics
Cleanup dot.py

Don't use kwargs for the options.  Update the docstring with the options.  I
changed the name of the option ``depth`` to ``maxdepth``.
Add labelfunc option to dotprint

This determines how the labels of the leaves are printed. By default, it is
str, but another good choice is srepr.  This does not affect the printing of
non-leaves.
Add a test for labelfunc
Add repeat option to dotprint (True by default)

Previously, common subexpressions were printed the same way, so they would
result in the same nodes in the graph.  This would lead to things like x +
x**2 giving

      Add
      /\
     / Pow
     \ /\
      x  2

Now, it will give

     Add
     /\
    x Pow
      /\
     x  2

This problem would occur with any common subexpression.  The most common cases
were reused Symbols and reused numbers (especially -1, which occurs with any
subtraction or division).

Another consequence of the repeat=False behavior is that if a common
subexpression appears in two places in the args of a single object, only a
single edge is used.  Hence, with repeat=False, the number of edges coming out
of an object is not necessarily the same as the number of args that object
has.  For example

dotprint(x**x, repeat=False)

    Pow
     |
     x

dotprint(x**x, repeat=True)

     Pow
     /\
    x  x

I implemented this by appending a signature to each node name corresponding to
its position in the expression tree.  For example, for expr = Add(x, Pow(x,
2)), the signature of the second x is (1, 0), meaning that it is
expr.args[1].args[0].

I also removed the API to let functions define how to dot print themselves, as
it uses nonstandard naming, and will break if we add new features like this
one.

I fixed an instance where atom should have been used instead of defaulting to
not isinstance(expr, Basic).

(sorry, I didn't bother to split these last two things into separate commits)
Add __all__ to sympy/printing/dot.py

It just includes dotprint. I wasn't sure if any of the other functions in the
file were intended to be public API.
Add comment about quadratic complexity
Add dotprint to Sphinx

We really need separate printing files for these things, but for now, it is
the only one, so I didn't bother.
Merge branch 'master' into dot-printing
ask(Q.foo_elements(MatMul(...))) handles scalar args
ZeroMatrix.__nonzero__ returns False
Merge pull request #2145 from mrocklin/matmul-element-types

ask(Q.foo_elements(MatMul(...))) handles scalar args
Merge pull request #10 from asmeurer/dot-printing

Dot printing