In [1]:
%load_ext watermark

In [2]:
%watermark -u -v -d -p matplotlib,numpy


Last updated: 16/07/2014 

CPython 3.4.1
IPython 2.1.0

matplotlib 1.3.1
numpy 1.8.1

[More info](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/ipython_magic/watermark.ipynb) about the `%watermark` extension


In [3]:
%matplotlib inline

Sections



Basic pie chart


In [9]:
from matplotlib import pyplot as plt
import numpy as np

X = np.random.random_integers(1,5,5) # 5 random integers within 1-5
cols = ['b', 'g', 'r', 'y', 'm']
plt.pie(X, colors=cols)
plt.legend(X)

plt.show()




Basic triangulation


In [5]:
from matplotlib import pyplot as plt
import matplotlib.tri as tri
import numpy as np

rand_data = np.random.randn(50, 2)

triangulation = tri.Triangulation(rand_data[:,0], rand_data[:,1])

plt.triplot(triangulation)

plt.show()