Skip to content

Commit

Permalink
Fix #886 - geom_crossbar: an error occurs if the mapped values of aes…
Browse files Browse the repository at this point in the history
…thetics are not populated
  • Loading branch information
RYangazov committed Sep 28, 2023
1 parent adbb460 commit 9c3dec4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion future_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
### Fixed

- Tooltips are trimmed and not visible on a very narrow chart [[#837](https://github.com/JetBrains/lets-plot/issues/837)].
- Inability to use the spelling "grey" for the color grey (via "gray" only).
- Inability to use the spelling "grey" for the color grey (via "gray" only).
- `geom_crossbar`: an error occurs if the mapped values of aesthetics are not populated [[#886](https://github.com/JetBrains/lets-plot/issues/886)].
2 changes: 1 addition & 1 deletion python-package/lets_plot/plot/geom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,7 @@ def geom_crossbar(mapping=None, *, data=None, stat=None, position=None, show_leg
geom_jitter(aes(x='x', y='y'), data=df, width=.3, shape=1, color='black', alpha=.5)
"""
if ('middle' in mapping.props()):
if mapping is not None and 'middle' in mapping.props():
print("WARN: using 'middle' aesthetic parameter for crossbar was deprecated.\n"
" Please, use `y` aesthetic instead.")
mapping.props()['y'] = mapping.props().pop('middle')
Expand Down

0 comments on commit 9c3dec4

Please sign in to comment.