Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9365767

Browse files
author
shawnchen
committed
flake8 compliance
1 parent 979ecee commit 9365767

1 file changed

Lines changed: 21 additions & 16 deletions

File tree

lib/matplotlib/colorbar.py

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import matplotlib.path as mpath
4545
import matplotlib.spines as mspines
4646
import matplotlib.transforms as mtransforms
47+
import matplotlib._layoutbox as layoutbox
4748
from matplotlib import docstring
4849

4950
_log = logging.getLogger(__name__)
@@ -1523,34 +1524,38 @@ def make_axes_gridspec(parent, *, location=None, orientation=None,
15231524
wh_ratios = [(1-anchor[1])*(1-shrink), shrink, anchor[1]*(1-shrink)]
15241525

15251526
if location == 'left':
1526-
gs = parent.get_subplotspec().subgridspec(1, 2,
1527-
wspace=wh_space, width_ratios=[fraction, 1-fraction-pad])
1527+
gs = parent.get_subplotspec().subgridspec(
1528+
1, 2, wspace=wh_space,
1529+
width_ratios=[fraction, 1-fraction-pad])
15281530
ss_main = gs[1]
1529-
ss_cb = gs[0].subgridspec(3, 1,
1530-
hspace=0, height_ratios=wh_ratios)[1]
1531+
ss_cb = gs[0].subgridspec(
1532+
3, 1, hspace=0, height_ratios=wh_ratios)[1]
15311533
else:
1532-
gs = parent.get_subplotspec().subgridspec(1, 2,
1533-
wspace=wh_space, width_ratios=[1-fraction-pad, fraction])
1534+
gs = parent.get_subplotspec().subgridspec(
1535+
1, 2, wspace=wh_space,
1536+
width_ratios=[1-fraction-pad, fraction])
15341537
ss_main = gs[0]
1535-
ss_cb = gs[1].subgridspec(3, 1,
1536-
hspace=0, height_ratios=wh_ratios)[1]
1538+
ss_cb = gs[1].subgridspec(
1539+
3, 1, hspace=0, height_ratios=wh_ratios)[1]
15371540
else:
15381541
# for shrinking
15391542
wh_ratios = [anchor[0]*(1-shrink), shrink, (1-anchor[0])*(1-shrink)]
15401543

15411544
if location == 'bottom':
1542-
gs = parent.get_subplotspec().subgridspec(2, 1,
1543-
hspace=wh_space, height_ratios=[1-fraction-pad, fraction])
1545+
gs = parent.get_subplotspec().subgridspec(
1546+
2, 1, hspace=wh_space,
1547+
height_ratios=[1-fraction-pad, fraction])
15441548
ss_main = gs[0]
1545-
ss_cb = gs[1].subgridspec(1, 3,
1546-
wspace=0, width_ratios=wh_ratios)[1]
1549+
ss_cb = gs[1].subgridspec(
1550+
1, 3, wspace=0, width_ratios=wh_ratios)[1]
15471551
aspect = 1 / aspect
15481552
else:
1549-
gs = parent.get_subplotspec().subgridspec(2, 1,
1550-
hspace=wh_space, height_ratios=[fraction, 1-fraction-pad])
1553+
gs = parent.get_subplotspec().subgridspec(
1554+
2, 1, hspace=wh_space,
1555+
height_ratios=[fraction, 1-fraction-pad])
15511556
ss_main = gs[1]
1552-
ss_cb = gs[0].subgridspec(1, 3,
1553-
wspace=0, width_ratios=wh_ratios)[1]
1557+
ss_cb = gs[0].subgridspec(
1558+
1, 3, wspace=0, width_ratios=wh_ratios)[1]
15541559
aspect = 1 / aspect
15551560

15561561
parent.set_subplotspec(ss_main)

0 commit comments

Comments
 (0)