()
| 9572 | |
| 9573 | |
| 9574 | def test_plot_format(): |
| 9575 | fig, ax = plt.subplots() |
| 9576 | line = ax.plot([1, 2, 3], '1.0') |
| 9577 | assert line[0].get_color() == (1.0, 1.0, 1.0, 1.0) |
| 9578 | assert line[0].get_marker() == 'None' |
| 9579 | fig, ax = plt.subplots() |
| 9580 | line = ax.plot([1, 2, 3], '1') |
| 9581 | assert line[0].get_marker() == '1' |
| 9582 | fig, ax = plt.subplots() |
| 9583 | line = ax.plot([1, 2], [1, 2], '1.0', "1") |
| 9584 | fig.canvas.draw() |
| 9585 | assert line[0].get_color() == (1.0, 1.0, 1.0, 1.0) |
| 9586 | assert ax.get_yticklabels()[0].get_text() == '1' |
| 9587 | fig, ax = plt.subplots() |
| 9588 | line = ax.plot([1, 2], [1, 2], '1', "1.0") |
| 9589 | fig.canvas.draw() |
| 9590 | assert line[0].get_marker() == '1' |
| 9591 | assert ax.get_yticklabels()[0].get_text() == '1.0' |
| 9592 | fig, ax = plt.subplots() |
| 9593 | line = ax.plot([1, 2, 3], 'k3') |
| 9594 | assert line[0].get_marker() == '3' |
| 9595 | assert line[0].get_color() == 'k' |
| 9596 | fig, ax = plt.subplots() |
| 9597 | line = ax.plot([1, 2, 3], '.C12:') |
| 9598 | assert line[0].get_marker() == '.' |
| 9599 | assert line[0].get_color() == mcolors.to_rgba('C12') |
| 9600 | assert line[0].get_linestyle() == ':' |
| 9601 | |
| 9602 | |
| 9603 | def test_automatic_legend(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…