Skip to content

Commit 5d25e1f

Browse files
committed
STY: apply black
1 parent f92c4bd commit 5d25e1f

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

tutorials/provisional/mosaic.py

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ def identify_axes(ax_dict, fontsize=48):
6666
fig = plt.figure(constrained_layout=True)
6767
ax_array = fig.subplots(2, 2, squeeze=False)
6868

69-
ax_array[0, 0].bar(['a', 'b', 'c'], [5, 7, 9])
69+
ax_array[0, 0].bar(["a", "b", "c"], [5, 7, 9])
7070
ax_array[0, 1].plot([1, 2, 3])
71-
ax_array[1, 0].hist(hist_data, bins='auto')
71+
ax_array[1, 0].hist(hist_data, bins="auto")
7272
ax_array[1, 1].imshow([[1, 2], [2, 1]])
7373

7474
identify_axes(
75-
{(j, k): a for j, r in enumerate(ax_array) for k, a in enumerate(r)}
75+
{(j, k): a for j, r in enumerate(ax_array) for k, a in enumerate(r)},
7676
)
7777

7878
###############################################################################
@@ -81,12 +81,15 @@ def identify_axes(ax_dict, fontsize=48):
8181

8282
fig = plt.figure(constrained_layout=True)
8383
ax_dict = fig.subplot_mosaic(
84-
[['bar', 'plot'],
85-
['hist', 'image']])
86-
ax_dict['bar'].bar(['a', 'b', 'c'], [5, 7, 9])
87-
ax_dict['plot'].plot([1, 2, 3])
88-
ax_dict['hist'].hist(hist_data)
89-
ax_dict['image'].imshow([[1, 2], [2, 1]])
84+
[
85+
["bar", "plot"],
86+
["hist", "image"],
87+
],
88+
)
89+
ax_dict["bar"].bar(["a", "b", "c"], [5, 7, 9])
90+
ax_dict["plot"].plot([1, 2, 3])
91+
ax_dict["hist"].hist(hist_data)
92+
ax_dict["image"].imshow([[1, 2], [2, 1]])
9093
identify_axes(ax_dict)
9194

9295
###############################################################################
@@ -277,11 +280,12 @@ def identify_axes(ax_dict, fontsize=48):
277280
# list), for example using spans, blanks, and *gridspec_kw*:
278281

279282
axd = plt.figure(constrained_layout=True).subplot_mosaic(
280-
[["main", "zoom"],
281-
["main", "BLANK"]
282-
],
283+
[
284+
["main", "zoom"],
285+
["main", "BLANK"],
286+
],
283287
empty_sentinel="BLANK",
284-
gridspec_kw={"width_ratios": [2, 1]}
288+
gridspec_kw={"width_ratios": [2, 1]},
285289
)
286290
identify_axes(axd)
287291

@@ -311,6 +315,7 @@ def identify_axes(ax_dict, fontsize=48):
311315
for j in range(4):
312316
mosaic[j, j] = j + 1
313317
axd = plt.figure(constrained_layout=True).subplot_mosaic(
314-
mosaic, empty_sentinel=0
318+
mosaic,
319+
empty_sentinel=0,
315320
)
316321
identify_axes(axd)

0 commit comments

Comments
 (0)