Skip to content

Commit eecf054

Browse files
committed
add fontsize arg to docstring and pass to side_plot
1 parent 4f42d68 commit eecf054

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
name='supervenn',
1818
license='MIT',
1919
description='supervenn is a tool for visualization of relations of many sets using matplotlib',
20-
version='0.3.1',
20+
version='0.3.2',
2121
long_description='See https://github.com/gecko984/supervenn/blob/master/README.md',
2222
url='https://github.com/gecko984/supervenn',
2323
packages=setuptools.find_packages(),

supervenn/_plots.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ def supervenn(sets, set_annotations=None, figsize=None, side_plots=True,
358358
clutter)
359359
:param widths_minmax_ratio: desired max/min ratio of displayed chunk widths, default None (show actual widths)
360360
:param rotate_col_annotations: True / False, whether to print annotations vertically
361+
:param fontsize: font size for all text elements
361362
:param row_annotations_y: a number in (0, 1), position for row annotations in the row. Default 0.5 - center of row.
362363
:param col_annotations_area_height: height of area for column annotations in inches, 1 by default
363364
:param col_annotations_ys_count: 1 (default), 2, or 3 - use to reduce clutter in column annotations area
@@ -436,14 +437,17 @@ def supervenn(sets, set_annotations=None, figsize=None, side_plots=True,
436437

437438
# Side plots
438439
if side_plots:
440+
fontsize = kw.get('fontsize', DEFAULT_FONTSIZE)
441+
439442
plt.sca(axes['top_side_plot'])
440443
side_plot(composition_array.sum(0), col_widths, 'h',
441444
min_width_for_annotation=effective_min_width_for_annotation,
442-
rotate_annotations=kw.get('rotate_col_annotations', False), color=side_plot_color)
445+
rotate_annotations=kw.get('rotate_col_annotations', False), color=side_plot_color, fontsize=fontsize)
443446
plt.xlim(xlim)
444447

445448
plt.sca(axes['right_side_plot'])
446-
side_plot([len(sets[i]) for i in permutations_['sets_ordering']], [1] * len(sets), 'v', color=side_plot_color)
449+
side_plot([len(sets[i]) for i in permutations_['sets_ordering']], [1] * len(sets), 'v', color=side_plot_color,
450+
fontsize=fontsize)
447451
plt.ylim(ylim)
448452

449453
plt.sca(axes['main'])

0 commit comments

Comments
 (0)