|
10 | 10 | """
|
11 | 11 | import numpy as np
|
12 | 12 | import matplotlib.pyplot as plt
|
13 |
| -import pylab |
14 | 13 | from matplotlib.ticker import MaxNLocator
|
15 | 14 |
|
16 | 15 | student = 'Johnny Doe'
|
|
33 | 32 | rects = ax1.barh(pos, rankings, align='center', height=0.5, color='m')
|
34 | 33 |
|
35 | 34 | ax1.axis([0, 100, 0, 5])
|
36 |
| -pylab.yticks(pos, testNames) |
| 35 | +plt.yticks(pos, testNames) |
37 | 36 | ax1.set_title('Johnny Doe')
|
38 | 37 | plt.text(50, -0.5, 'Cohort Size: ' + str(cohortSize),
|
39 | 38 | horizontalalignment='center', size='small')
|
|
43 | 42 | ax2 = ax1.twinx()
|
44 | 43 | ax2.plot([100, 100], [0, 5], 'white', alpha=0.1)
|
45 | 44 | ax2.xaxis.set_major_locator(MaxNLocator(11))
|
46 |
| -xticks = pylab.setp(ax2, xticklabels=['0', '10', '20', '30', '40', '50', '60', |
| 45 | +xticks = plt.setp(ax2, xticklabels=['0', '10', '20', '30', '40', '50', '60', |
47 | 46 | '70', '80', '90', '100'])
|
48 | 47 | ax2.xaxis.grid(True, linestyle='--', which='major', color='grey',
|
49 | 48 | alpha=0.25)
|
|
0 commit comments