Skip to content

Commit 6464121

Browse files
committed
Fix legend_key_height
fixes #921
1 parent ff6de91 commit 6464121

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/changelog.qmd

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ title: Changelog
1111
[](:attr:`~plotnine.data.midwest`) no longer have any of their columns as categoricals.
1212
This matches the respective datasets in R. {{< issue 913 >}}
1313

14+
### Bug Fixes
15+
16+
- Fixed bug in with the `legend_key_height` themeable where it wasn't applied.
17+
{{< issue 921 >}}
18+
1419
## v0.14.5
1520
(2025-01-02)
1621
[![](https://zenodo.org/badge/DOI/10.5281/zenodo.14587381.svg)](https://doi.org/10.5281/zenodo.14587381)

plotnine/guides/guide_legend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ def key_heights(self) -> list[float]:
452452
If legend is horizontal, then key heights must be equal, so we
453453
use the maximum
454454
"""
455-
hs = [h for h, _ in self._key_dimensions]
455+
hs = [h for _, h in self._key_dimensions]
456456
if self.is_horizontal:
457457
return [max(hs)] * len(hs)
458458
return hs

0 commit comments

Comments
 (0)