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

The scale name does not apply with as_discrete() #653

Closed
OLarionova-HORIS opened this issue Dec 14, 2022 · 0 comments
Closed

The scale name does not apply with as_discrete() #653

OLarionova-HORIS opened this issue Dec 14, 2022 · 0 comments
Assignees
Milestone

Comments

@OLarionova-HORIS
Copy link
Contributor

The scale name is not applied when as_discrete() is used:

from lets_plot import *
from lets_plot.mapping import as_discrete

LetsPlot.setup_html()

dat2 = dict(
    x = ["a", "a", "b"],
)

(ggplot(dat2) + 
 geom_bar(aes("x", fill=as_discrete("x"))) + 
 scale_fill_manual(name="O", values=["red", "blue"], labels=['No', 'Yes'])
)

Result:
Screenshot 2022-12-14 at 17 28 49

Expected:
the legend title should contains "O"

Notebook example: here

@alshan alshan added this to the 2023Q1 milestone Dec 28, 2022
@OLarionova-HORIS OLarionova-HORIS self-assigned this Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants