laserson/squarify — pull request #1 by sinhrks (2014-03-16 06:25:58+00:00)
Title: add plot method using matplotlib

Added `plot` method using matplotlib. Matplotlib is imported in the `plot` method and it should not affect to dependencies.

*Usage Example:*
```
import squarify
import matplotlib.pyplot as plt
from numpy.random import rand

fig, axes = plt.subplots(2, 3, figsize=(14, 8))
plt.subplots_adjust(top=0.95, bottom=0.05, left=0.05, right=0.95, hspace=0.35)

sq = 8

def random_colors(n):
return zip(rand(n), rand(n), rand(n))

labels = ['Sq{0}'.format(i) for i in range(sq)]

axes[0, 0].set_title('Default')
squarify.plot(rand(sq), ax=axes[0, 0])

axes[0, 1].set_title('Specify single color')
squarify.plot(rand(sq), color='r', ax=axes[0, 1])

axes[0, 2].set_title('Specify each colors')
squarify.plot(rand(sq), color=random_colors(sq), ax=axes[0, 2])

axes[1, 0].set_title('Specify labels')
squarify.plot(rand(sq), label=labels, ax=axes[1, 0])

sizes = rand(sq)
values = ['{0:0.2f}'.format(s) for s in sizes]
axes[1, 1].set_title('Specify values')
squarify.plot(sizes, value=values, ax=axes[1, 1])

axes[1, 2].set_title('Specify labels and values')
squarify.plot(sizes, label=labels, value=values, ax=axes[1, 2])
plt.show()
```

*Output:*
![squarify_plot](https://f.cloud.github.com/assets/1696302/2430332/23b4e2a8-acd3-11e3-871b-52ec45a764b9.png)