Skip to content

Commit 469959b

Browse files
Add back the bbox_inches part
1 parent 262ccba commit 469959b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

galleries/examples/subplots_axes_and_figures/figure_size_units.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,18 @@
5757
# tedious for quick iterations.
5858
#
5959
# Because of the default ``rcParams['figure.dpi'] = 100``, one can mentally
60-
# divide the needed pixel value by 100:
60+
# divide the needed pixel value by 100 [#]_:
6161
#
6262
plt.subplots(figsize=(6, 2))
6363
plt.text(0.5, 0.5, '600px x 200px', **text_kwargs)
6464
plt.show()
6565

66+
# %%
67+
# .. [#] Unfortunately, this does not work well for the ``matplotlib inline``
68+
# backend in Jupyter because that backend saves the figure
69+
# with ``bbox_inches='tight'``, which crops the figure and makes the
70+
# actual size unpredictable.
71+
6672
# %%
6773
#
6874
# .. admonition:: References

0 commit comments

Comments
 (0)