In [1]:
from pylab import *
import numpy as np
import pandas as pd

In [2]:
x = np.linspace(0, 5, 10)
xx = np.linspace(-0.75, 1., 100)
n = np.array([0,1,2,3,4,5])
dates = pd.date_range('20130101', periods=6)
df = pd.DataFrame(np.random.randn(6,4), index=dates, columns=list('ABCD'))
df


Out[2]:
A B C D
2013-01-01 2.278744 -0.652785 0.574983 -0.408235
2013-01-02 0.886904 -1.415350 0.487806 -0.117535
2013-01-03 1.280152 0.451589 2.450064 -0.159981
2013-01-04 -0.163132 0.141542 1.810313 2.263799
2013-01-05 -0.488827 0.263963 0.598489 0.933941
2013-01-06 -1.589058 0.054630 1.425882 0.133386

In [3]:
fig, axes = plt.subplots(1, 4, figsize=(12,3))

axes[0].scatter(xx, xx + 0.25*np.random.randn(len(xx)))
axes[0].set_title("scatter")

axes[1].step(n, n**2, lw=2)
axes[1].set_title("step")

axes[2].bar(n, n**2, align="center", width=0.5, alpha=0.5)
axes[2].set_title("bar")

axes[3].fill_between(x, x**2, x**3, color="green", alpha=0.5);
axes[3].set_title("fill_between");
show(fig)



In [4]:
# polar plot using add_axes and polar projection
fig = plt.figure()
ax = fig.add_axes([0.0, 0.0, .6, .6], polar=True)
t = np.linspace(0, 2 * np.pi, 100)
ax.plot(t, t, color='blue', lw=3);
show(fig)