()
| 6513 | |
| 6514 | |
| 6515 | def test_relim_visible_only(): |
| 6516 | x1 = (0., 10.) |
| 6517 | y1 = (0., 10.) |
| 6518 | x2 = (-10., 20.) |
| 6519 | y2 = (-10., 30.) |
| 6520 | |
| 6521 | fig = matplotlib.figure.Figure() |
| 6522 | ax = fig.add_subplot() |
| 6523 | ax.plot(x1, y1) |
| 6524 | assert ax.get_xlim() == x1 |
| 6525 | assert ax.get_ylim() == y1 |
| 6526 | line, = ax.plot(x2, y2) |
| 6527 | assert ax.get_xlim() == x2 |
| 6528 | assert ax.get_ylim() == y2 |
| 6529 | line.set_visible(False) |
| 6530 | assert ax.get_xlim() == x2 |
| 6531 | assert ax.get_ylim() == y2 |
| 6532 | |
| 6533 | ax.relim(visible_only=True) |
| 6534 | ax.autoscale_view() |
| 6535 | |
| 6536 | assert ax.get_xlim() == x1 |
| 6537 | assert ax.get_ylim() == y1 |
| 6538 | |
| 6539 | |
| 6540 | def test_relim_collection(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…