8000 Merge pull request #29667 from rcomer/doc-inset-gridspec · matplotlib/matplotlib@c9402f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit c9402f3

Browse files
authored
Merge pull request #29667 from rcomer/doc-inset-gridspec
DOC: remove redundant gridspec from example
2 parents 9130caf + d899159 commit c9402f3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

galleries/examples/lines_bars_and_markers/scatter_hist.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,10 @@ def scatter_hist(x, y, ax, ax_histx, ax_histy):
9090

9191
# Create a Figure, which doesn't have to be square.
9292
fig = plt.figure(layout='constrained')
93-
# Create the main Axes, leaving 25% of the figure space at the top and on the
94-
# right to position marginals.
95-
ax = fig.add_gridspec(top=0.75, right=0.75).subplots()
93+
# Create the main Axes.
94+
ax = fig.add_subplot()
9695
# The main Axes' aspect can be fixed.
97-
ax.set(aspect=1)
96+
ax.set_aspect('equal')
9897
# Create marginal Axes, which have 25% of the size of the main Axes. Note that
9998
# the inset Axes are positioned *outside* (on the right and the top) of the
10099
# main Axes, by specifying axes coordinates greater than 1. Axes coordinates

0 commit comments

Comments
 (0)
0