import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
np.random.seed(25)
ticks = ax.set_xticks([0,10,20,30,40,50])
labels = ax.set_xticklabels(['zero', 'ten', 'twenty', 'thirty', 'forty', 'fifty'],
rotation=30, fontsize='small')
ax.set_xlabel('Stages')
ax.set_ylabel('Counts')
ax.set_title('Awesome Plot')
ax.plot(np.random.randn(50).cumsum())
[<matplotlib.lines.Line2D at 0x7feee46d4ca0>]
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
np.random.seed(0)
ax.plot(np.random.randn(50).cumsum(), 'k', label='one')
ax.plot(np.random.randn(50).cumsum(), 'k--', label='two')
ax.plot(np.random.randn(50).cumsum(), 'k.', label='three')
ax.legend(loc='best')
<matplotlib.legend.Legend at 0x7feee45f2a00>
import os
os.system('jupyter nbconvert --to html 4a_ticks_labels_legends.ipynb')