Skip to content

Commit 1a6517f

Browse files
committed
Respect user-input legend fontsize (fix #331)
1 parent 487ea38 commit 1a6517f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

WHATSNEW.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ Bug fixes
235235
max of `levels` when passed to `~proplot.colors.DiscreteNorm` (:commit:`e9ed16c1`).
236236
* Fix issue where unevenly-spaced `levels` combined with
237237
`~proplot.colors.DiscreteColormap` incorrectly samples the color list (:issue:`299`).
238+
* Fix issue where `~proplot.axes.Axes.legend` ignores the user-input
239+
`fontsize` (:issue:`331`).
238240
* Fix issue where setting :rcraw:`legend.facecolor` or :rcraw:`legend.edgecolor` to
239241
``'inherit'`` (or passing as keyword argument) raises error (:issue:`298`).
240242
* Fix issue where settings :rcraw:`grid.pad` and :rcraw:`grid.labelpad` and settings

proplot/axes/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,7 @@ def _add_legend(
11991199
ncol = _not_none(ncols=ncols, ncol=ncol)
12001200
order = _not_none(order, 'C')
12011201
frameon = _not_none(frame=frame, frameon=frameon, default=rc['legend.frameon'])
1202-
fontsize = _not_none(kwargs.pop('fontsize', None), rc['legend.fontsize'])
1202+
fontsize = _not_none(fontsize, rc['legend.fontsize'])
12031203
titlefontsize = _not_none(
12041204
title_fontsize=kwargs.pop('title_fontsize', None),
12051205
titlefontsize=titlefontsize,

0 commit comments

Comments
 (0)