Skip to content

Commit da7ffcc

Browse files
authored
Merge pull request #10367 from anntzer/constrainedlayoutguidetypos
constrained layout guide typos
2 parents aed4b74 + 46fdd60 commit da7ffcc

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

tutorials/intermediate/constrainedlayout_guide.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
How to use constrained-layout to fit plots within your figure cleanly.
77
88
*constrained_layout* automatically adjusts subplots and decorations like
9-
legends and colorbars so that they fit in the figure window wihile still
9+
legends and colorbars so that they fit in the figure window while still
1010
preserving, as best they can, the logical layout requested by the user.
1111
1212
*constrained_layout* is similar to *tight_layout*, but uses a constraint
@@ -24,7 +24,7 @@
2424
Simple Example
2525
==============
2626
27-
In matplotlib, the location of axes (including subplots) are specified in
27+
In Matplotlib, the location of axes (including subplots) are specified in
2828
normalized figure coordinates. It can happen that your axis labels or
2929
titles (or sometimes even ticklabels) go outside the figure area, and are thus
3030
clipped.
@@ -152,7 +152,7 @@ def example_plot(ax, fontsize=12, nodec=False):
152152
# Padding and Spacing
153153
# ===================
154154
#
155-
# For constrained_layout, we have implimented a padding around the edge of
155+
# For constrained_layout, we have implemented a padding around the edge of
156156
# each axes. This padding sets the distance from the edge of the plot,
157157
# and the minimum distance between adjacent plots. It is specified in
158158
# inches by the keyword arguments `w_pad` and `h_pad` to the function
@@ -234,7 +234,7 @@ def example_plot(ax, fontsize=12, nodec=False):
234234
# - `w_pad`, `h_pad` Padding around axes objects.
235235
# Float representing inches. Default is 3./72. inches (3 pts)
236236
# - `wspace`, `hspace` Space between subplot groups.
237-
# Float representing a fraction of the suplot widths being separated.
237+
# Float representing a fraction of the subplot widths being separated.
238238
# Default is 0.02.
239239

240240
plt.rcParams['figure.constrained_layout.use'] = True
@@ -472,7 +472,7 @@ def docomplicated(suptitle=None):
472472
# https://github.com/matplotlib/matplotlib/issues.
473473
#
474474
# If there is a bug, please report with a self-contained example that does
475-
# not require outside data or dependencies (other than perhaps numpy).
475+
# not require outside data or dependencies (other than numpy).
476476

477477
###########################################################
478478
# Notes on the algorithm
@@ -515,7 +515,7 @@ def docomplicated(suptitle=None):
515515
# `ax.position`, which sets where in the figure the spines are placed.
516516
#
517517
# Why so many stacked containers? Ideally, all that would be needed are the
518-
# Axes layotu boxes. For the Gridspec case, a container is
518+
# Axes layout boxes. For the Gridspec case, a container is
519519
# needed if the Gridspec is nested via `~.GridSpecFromSubplotSpec`. At the
520520
# top level, it is desirable for symmetry, but it also makes room for
521521
# `~.Figure.suptitle`.
@@ -529,8 +529,8 @@ def docomplicated(suptitle=None):
529529
# ---------------------
530530
#
531531
# For a single Axes the layout is straight forward. The Figure and
532-
# outer Gridspec layoutboxes co-incide. The Subplotspec and Axes
533-
# boxes also co-incide because the Axes has no colorbar. Note
532+
# outer Gridspec layoutboxes coincide. The Subplotspec and Axes
533+
# boxes also coincide because the Axes has no colorbar. Note
534534
# the difference between the red ``pos`` box and the green ``ax`` box
535535
# is set by the size of the decorations around the Axes.
536536
#
@@ -584,7 +584,7 @@ def docomplicated(suptitle=None):
584584
#
585585
# Adding a colorbar makes it clear why the Subplotspec layoutboxes must
586586
# be different from the axes layoutboxes. Here we see the left-hand
587-
# subplotspec has more room to accomodate the `~.Figure.colorbar`, and
587+
# subplotspec has more room to accommodate the `~.Figure.colorbar`, and
588588
# that there are two green ``ax`` boxes inside the ``ss`` box.
589589
#
590590
# Note that the width of the ``pos`` boxes is still the same because of the
@@ -629,7 +629,7 @@ def docomplicated(suptitle=None):
629629
# The first method is used here. The constraint that makes the heights
630630
# be correct is in the code where ``drowsC < drows0`` which in
631631
# this case would be 1 is less than 2. So we constrain the
632-
# the height of the 1-row Axes to be less than half the height of the
632+
# height of the 1-row Axes to be less than half the height of the
633633
# 2-row Axes.
634634
#
635635
# ..note::
@@ -650,7 +650,7 @@ def docomplicated(suptitle=None):
650650
plot_children(fig, fig._layoutbox, printit=False)
651651

652652
#######################################################################
653-
# Height and width ratios are accomodated with the same part of
653+
# Height and width ratios are accommodated with the same part of
654654
# the code with the smaller axes always constrained to be less in size
655655
# than the larger.
656656

@@ -675,7 +675,7 @@ def docomplicated(suptitle=None):
675675
# The final piece of the code that has not been explained is what happens if
676676
# there is an empty gridspec opening. In that case a fake invisible axes is
677677
# added and we proceed as before. The empty gridspec has no decorations, but
678-
# the axes postion in made the same size as the occupied Axes positions.
678+
# the axes position in made the same size as the occupied Axes positions.
679679
#
680680
# This is done at the start of
681681
# `~._constrained_layout.do_constrained_layout` (``hassubplotspec``).

0 commit comments

Comments
 (0)