back to the matplotlib-gallery
at https://github.com/rasbt/matplotlib-gallery
In [1]:
%load_ext watermark
In [2]:
%watermark -u -v -d -p matplotlib,numpy
[More info](http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/ipython_magic/watermark.ipynb) about the `%watermark` extension
In [3]:
%matplotlib inline
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()
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()