Skip to content

Commit

Permalink
add fontsize arg to docstring and pass to side_plot
Browse files Browse the repository at this point in the history
  • Loading branch information
gecko984 committed Jan 5, 2021
1 parent 4f42d68 commit eecf054
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
name='supervenn',
license='MIT',
description='supervenn is a tool for visualization of relations of many sets using matplotlib',
version='0.3.1',
version='0.3.2',
long_description='See https://github.com/gecko984/supervenn/blob/master/README.md',
url='https://github.com/gecko984/supervenn',
packages=setuptools.find_packages(),
Expand Down
8 changes: 6 additions & 2 deletions supervenn/_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ def supervenn(sets, set_annotations=None, figsize=None, side_plots=True,
clutter)
:param widths_minmax_ratio: desired max/min ratio of displayed chunk widths, default None (show actual widths)
:param rotate_col_annotations: True / False, whether to print annotations vertically
:param fontsize: font size for all text elements
:param row_annotations_y: a number in (0, 1), position for row annotations in the row. Default 0.5 - center of row.
:param col_annotations_area_height: height of area for column annotations in inches, 1 by default
:param col_annotations_ys_count: 1 (default), 2, or 3 - use to reduce clutter in column annotations area
Expand Down Expand Up @@ -436,14 +437,17 @@ def supervenn(sets, set_annotations=None, figsize=None, side_plots=True,

# Side plots
if side_plots:
fontsize = kw.get('fontsize', DEFAULT_FONTSIZE)

plt.sca(axes['top_side_plot'])
side_plot(composition_array.sum(0), col_widths, 'h',
min_width_for_annotation=effective_min_width_for_annotation,
rotate_annotations=kw.get('rotate_col_annotations', False), color=side_plot_color)
rotate_annotations=kw.get('rotate_col_annotations', False), color=side_plot_color, fontsize=fontsize)
plt.xlim(xlim)

plt.sca(axes['right_side_plot'])
side_plot([len(sets[i]) for i in permutations_['sets_ordering']], [1] * len(sets), 'v', color=side_plot_color)
side_plot([len(sets[i]) for i in permutations_['sets_ordering']], [1] * len(sets), 'v', color=side_plot_color,
fontsize=fontsize)
plt.ylim(ylim)

plt.sca(axes['main'])
Expand Down

0 comments on commit eecf054

Please sign in to comment.