()
| 52 | |
| 53 | @image_comparison(['table_labels.png'], style='mpl20') |
| 54 | def test_label_colours(): |
| 55 | dim = 3 |
| 56 | |
| 57 | c = np.linspace(0, 1, dim) |
| 58 | colours = plt.colormaps["RdYlGn"](c) |
| 59 | cellText = [['1'] * dim] * dim |
| 60 | |
| 61 | fig = plt.figure() |
| 62 | |
| 63 | ax1 = fig.add_subplot(4, 1, 1) |
| 64 | ax1.axis('off') |
| 65 | ax1.table(cellText=cellText, |
| 66 | rowColours=colours, |
| 67 | loc='best') |
| 68 | |
| 69 | ax2 = fig.add_subplot(4, 1, 2) |
| 70 | ax2.axis('off') |
| 71 | ax2.table(cellText=cellText, |
| 72 | rowColours=colours, |
| 73 | rowLabels=['Header'] * dim, |
| 74 | loc='best') |
| 75 | |
| 76 | ax3 = fig.add_subplot(4, 1, 3) |
| 77 | ax3.axis('off') |
| 78 | ax3.table(cellText=cellText, |
| 79 | colColours=colours, |
| 80 | loc='best') |
| 81 | |
| 82 | ax4 = fig.add_subplot(4, 1, 4) |
| 83 | ax4.axis('off') |
| 84 | ax4.table(cellText=cellText, |
| 85 | colColours=colours, |
| 86 | colLabels=['Header'] * dim, |
| 87 | loc='best') |
| 88 | |
| 89 | |
| 90 | @image_comparison(['table_cell_manipulation.png'], style='mpl20') |
nothing calls this directly
no test coverage detected
searching dependent graphs…