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

Commita7b7b13

Browse files
committed
DOC: ensure that the bounding box is scaled with dpi in example
closes#26264
1 parent7cab499 commita7b7b13

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