()
| 613 | |
| 614 | |
| 615 | def test_rect(): |
| 616 | fig, ax = plt.subplots(layout='constrained') |
| 617 | fig.get_layout_engine().set(rect=[0, 0, 0.5, 0.5]) |
| 618 | fig.draw_without_rendering() |
| 619 | ppos = ax.get_position() |
| 620 | assert ppos.x1 < 0.5 |
| 621 | assert ppos.y1 < 0.5 |
| 622 | |
| 623 | fig, ax = plt.subplots(layout='constrained') |
| 624 | fig.get_layout_engine().set(rect=[0.2, 0.2, 0.3, 0.3]) |
| 625 | fig.draw_without_rendering() |
| 626 | ppos = ax.get_position() |
| 627 | assert ppos.x1 < 0.5 |
| 628 | assert ppos.y1 < 0.5 |
| 629 | assert ppos.x0 > 0.2 |
| 630 | assert ppos.y0 > 0.2 |
| 631 | |
| 632 | |
| 633 | def test_compressed1(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…