Skip to content

Commit 872f406

Browse files
committed
Support plotnine v0.12.1
1 parent d11826e commit 872f406

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

patchworklib/patchworklib.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -320,19 +320,20 @@ def draw_labels(bricks, gori, gcp, figsize):
320320
def draw_legend(bricks, gori, gcp, figsize):
321321
get_property = gcp.theme.themeables.property
322322
legend_box = gcp.guides.build(gcp)
323-
try:
324-
if StrictVersion(plotnine_version) >= StrictVersion("0.12"):
325-
spacing = get_property('legend_box_spacing')
326-
wratio = 1
327-
hratio = 1
328-
else:
329-
spacing = get_property('legend_box_spacing')
330-
wraio = figsize[0]
331-
hratio = figsize[1]
332323

324+
if StrictVersion(plotnine_version) >= StrictVersion("0.12"):
325+
wratio = 1
326+
hratio = 1
327+
else:
328+
wraio = figsize[0]
329+
hratio = figsize[1]
330+
331+
try:
332+
spacing = get_property('legend_box_spacing')
333333
except KeyError:
334334
spacing = 0.1
335335

336+
336337
position = gcp.guides.position
337338
if position == 'right':
338339
loc = 6

0 commit comments

Comments
 (0)