Skip to content

Commit 51a7ef7

Browse files
Hideto MoriHideto Mori
Hideto Mori
authored and
Hideto Mori
committed
patchworklib/patchworklib.py
1 parent 4f8dfc0 commit 51a7ef7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

patchworklib/patchworklib.py

100644100755
+4-3
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ def hstack(brick1, brick2, target=None, margin=None, direction="r", adjust_heigh
12721272
brick1_icorners = brick1.get_inner_corner(labels)
12731273
brick2_icorners = brick2.get_inner_corner()
12741274
vratio = abs(brick1_icorners[3] - brick1_icorners[2]) / abs(brick2_icorners[3] - brick2_icorners[2])
1275-
if vratio < 0.8 and target is None:
1275+
if vratio < 0.8 and target is None and adjust_width == True:
12761276
expand(brick1, 1/vratio, 1/vratio)
12771277
brick1_ocorners = brick1.get_outer_corner()
12781278
brick2_ocorners = brick2.get_outer_corner()
@@ -1530,7 +1530,7 @@ def vstack(brick1, brick2, target=None, margin=None, direction="t", adjust_heigh
15301530
brick1_icorners = brick1.get_inner_corner(labels)
15311531
brick2_icorners = brick2.get_inner_corner()
15321532
hratio = abs(brick1_icorners[1] - brick1_icorners[0]) / abs(brick2_icorners[1] - brick2_icorners[0])
1533-
if hratio < 1.0 and target is None:
1533+
if hratio < 1.0 and target is None and adjust_width==True:
15341534
expand(brick1, 1/hratio, 1/hratio)
15351535
brick1_ocorners = brick1.get_outer_corner()
15361536
brick2_ocorners = brick2.get_outer_corner()
@@ -1658,7 +1658,8 @@ def vstack(brick1, brick2, target=None, margin=None, direction="t", adjust_heigh
16581658
new_bricks._case_labels = new_bricks._case_labels + brick1._case_labels + brick2._case_labels
16591659

16601660
for label in labels_all:
1661-
new_bricks._labels.add(label)
1661+
new_bricks._labels.add(label)
1662+
16621663
return new_bricks
16631664

16641665
def stack(bricks, margin=None, operator="|", equal_spacing=False):

0 commit comments

Comments
 (0)