Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legend override_aes #1115

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Fix wording
  • Loading branch information
MKoroteev-HORIS committed Jun 17, 2024
commit 946ac5c3d2a9fb32404c1519f59d0199eca31ab0
2 changes: 1 addition & 1 deletion future_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
See [example notebook](https://nbviewer.org/github/JetBrains/lets-plot/blob/master/docs/f-24e/legend_override_aes.ipynb).

### Changed
- [**breaking change**] guide_legend()/guide_colorbar() require keyword arguments for 'nrow'/'barwidth' other parameters except 'title'.
- [**breaking change**] `guide_legend()`/`guide_colorbar()` require keyword arguments for `nrow`/`barwidth` other parameters except `title`.

### Fixed
4 changes: 2 additions & 2 deletions python-package/test/plot/test_guides.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ def test_shape_and_color_guides():


def test_override_aes():
spec = (gg.ggplot() + gg.guides(color=guide_legend(override_aes=dict(color=['grey'], size=10))))
spec = (gg.ggplot() + gg.guides(color=guide_legend(override_aes=dict(color=['red'], size=10))))

as_dict = spec.as_dict()['guides']['color']['override_aes']
assert as_dict['color'][0] == 'grey'
assert as_dict['color'][0] == 'red'
assert as_dict['size'] == 10