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

Commitabb2059

Browse files
authored
Merge pull request#26265 from tacaswell/doc/fix_tight_bbox_example
2 parents1cc50f6 +a7b7b13 commitabb2059

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎galleries/users_explain/figure/figure_intro.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ would be saved if ``bbox_inches='tight'`` were used in savefig.
251251
ax.set_aspect(1)
252252
bb = ax.get_tightbbox()
253253
bb = bb.padded(10)
254+
bb = bb.transformed(fig.dpi_scale_trans.inverted())
254255
fancy = FancyBboxPatch(bb.p0, bb.width, bb.height, fc='none',
255256
ec=(0, 0.0, 0, 0.5), lw=2, linestyle='--',
256-
transform=None, clip_on=False)
257+
transform=fig.dpi_scale_trans,
258+
clip_on=False, boxstyle='Square, pad=0')
257259
ax.add_patch(fancy)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp