Compare the top two plots (and code)

In [1]:
import matplotlib.pyplot as plt
%matplotlib inline
from scipy import sin, linspace
In [2]:
x = linspace(0,10)
y = sin(x)*x
In [3]:
plt.title('Whoo Hoo!!!')
plt.xlabel('time')
plt.ylabel('happiness')
plt.plot(x,y);
In [4]:
plt.xkcd()
plt.title('Whoo Hoo!!!')
plt.xlabel('time')
plt.ylabel('happiness')
plt.plot(x,y);
In [5]:
x = [1, 2, 3, 4]
y = [1, 4, 9, 6]
labels = ['Frogs', 'Hogs', 'Bogs', 'Slogs']

plt.plot(x, y, 'ro')
# You can specify a rotation for the tick labels in degrees or with keywords.
plt.xticks(x, labels, rotation='vertical')
# Pad margins so that markers don't get clipped by the axes
plt.margins(0.2)
# Tweak spacing to prevent clipping of tick-labels
plt.subplots_adjust(bottom=0.15)
plt.show()