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

Commit57e8fc3

Browse files
authored
Merge pull request#17947 from jklymak/doc-fix-CL-savefile
DOC: don't make CL tutorial save new file all the time
2 parentsfcecbed +4ada98a commit57e8fc3

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ examples/*/*.svgz
7979
examples/tests/*
8080
!examples/tests/backend_driver_sgskip.py
8181
result_images
82+
doc/_static/constrained_layout*.png
8283

8384
# Nose/Pytest generated files #
8485
###############################
-37.6 KB
Binary file not shown.
-10.3 KB
Binary file not shown.
-10.3 KB
Binary file not shown.

‎tutorials/intermediate/constrainedlayout_guide.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,13 @@ def example_plot(ax, fontsize=12, hide_labels=False):
229229
leg.set_in_layout(True)
230230
# we don't want the layout to change at this point.
231231
fig.set_constrained_layout(False)
232-
fig.savefig('CL01.png',bbox_inches='tight',dpi=100)
232+
fig.savefig('../../doc/_static/constrained_layout_1b.png',
233+
bbox_inches='tight',dpi=100)
233234

234235
#############################################
235236
# The saved file looks like:
236237
#
237-
# .. image:: /_static/constrained_layout/CL01.png
238+
# .. image:: /_static/constrained_layout_1b.png
238239
# :align: center
239240
#
240241
# A better way to get around this awkwardness is to simply
@@ -245,12 +246,13 @@ def example_plot(ax, fontsize=12, hide_labels=False):
245246
labels= [l.get_label()forlinlines]
246247
leg=fig.legend(lines,labels,loc='center left',
247248
bbox_to_anchor=(0.8,0.5),bbox_transform=axs[1].transAxes)
248-
fig.savefig('CL02.png',bbox_inches='tight',dpi=100)
249+
fig.savefig('../../doc/_static/constrained_layout_2b.png',
250+
bbox_inches='tight',dpi=100)
249251

250252
#############################################
251253
# The saved file looks like:
252254
#
253-
# .. image:: /_static/constrained_layout/CL02.png
255+
# .. image:: /_static/constrained_layout_2b.png
254256
# :align: center
255257
#
256258

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp