|
1 | 1 | Figure now has ``draw_without_rendering`` method
|
2 | 2 | ------------------------------------------------
|
3 | 3 |
|
4 |
| -Rarely, the user will want to trigger a draw without rendering to either the |
5 |
| -screen or a file. This is useful for determining the final position of artists |
6 |
| -on the figure that require a draw, like text artists, or resolve deferred |
7 |
| -computation like automatic data limits. This can be done by |
8 |
| -``fig.canvas.draw()``, which forces a full draw and rendering, however this has |
9 |
| -side effects, sometimes requires an open file, and is doing more work than is |
10 |
| -needed. The `.Figure.draw_without_rendering` method is provided to run the |
11 |
| -code in Matplotlib that updates values that are computed at draw-time and get |
12 |
| -accurate dimensions of the Artists more efficiently. |
| 4 | +Some aspects of a figure are only determined at draw-time, such as the exact |
| 5 | +position of text artists or deferred computation like automatic data limits. |
| 6 | +If you need these values, you can use ``figure.canvas.draw()`` to force a full |
| 7 | +draw. However, this has side effects, sometimes requires an open file, and is |
| 8 | +doing more work than is needed. |
| 9 | + |
| 10 | +The new `.Figure.draw_without_rendering` method runs all the updates that |
| 11 | +``draw()`` does, but skips rendering the figure. It's thus more efficient if you |
| 12 | +need the updated values to configure further aspects of the figure. |
0 commit comments