In [11]:
import numpy as np
import matplotlib.pyplot as plt

# Data for plotting
t = np.arange(0.0, 4.0, 0.01)
s = 1 + np.sin((5 * 2)* np.pi * t)

# Note that using plt.subplots below is equivalent to using
# fig = plt.figure() and then ax = fig.add_subplot(111)
fig, ax = plt.subplots()
ax.plot(t, s)

ax.set(xlabel='time (s)', ylabel='voltage (mV)', title='Sine Wave')
ax.grid()
Out[11]:
In [9]:
import matplotlib.image as mpimg
img=mpimg.imread('bently-bear.png')
plt.imshow(img)
plt.axis('off')
plt.colorbar()
Out[9]:
<matplotlib.colorbar.Colorbar object at 0x7f6eec51f050>
Out[9]: