Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit58213bb

Browse files
committed
Correctly disable more drawing methods in tight_bboxing renderer.
These methods also try to write to the output file.
1 parentb9dfc53 commit58213bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎lib/matplotlib/backend_bases.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ def _get_renderer(figure, print_method, *, draw_disabled=False):
15001500
Get the renderer that would be used to save a `~.Figure`, and cache it on
15011501
the figure.
15021502
1503-
If *draw_disabled* is True, additionally replacedraw_foo methods on
1503+
If *draw_disabled* is True, additionally replacedrawing methods on
15041504
*renderer* by no-ops. This is used by the tight-bbox-saving renderer,
15051505
which needs to walk through the artist tree to compute the tight-bbox, but
15061506
for which the output file may be closed early.
@@ -1521,7 +1521,8 @@ def _draw(renderer): raise Done(renderer)
15211521

15221522
ifdraw_disabled:
15231523
formeth_nameindir(RendererBase):
1524-
ifmeth_name.startswith("draw_"):
1524+
if (meth_name.startswith("draw_")
1525+
ormeth_namein ["open_group","close_group"]):
15251526
setattr(renderer,meth_name,lambda*args,**kwargs:None)
15261527

15271528
returnrenderer

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp