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

Colours used: scatterplot example goes beyond data range #82

Open
edwardchalstrey1 opened this issue Dec 7, 2021 · 0 comments
Open
Labels

Comments

@edwardchalstrey1
Copy link
Member

edwardchalstrey1 commented Dec 7, 2021

Possibly due to an issue with .mark_bar() in altair, setting the "Color Binning" widget to "Continuous" results in the the y axis of the "colours used" and "density plots" not lining up correctly. This is because the colours used plot seems to be showing data points that exist outside the range of the data.

Debugging

Drop the following code into a cell of the "simple" scatter plot notebook (that loads the movie_data df) which clearly shows the issue

print(movie_data['Production_Budget'].min())
print(movie_data['Production_Budget'].max())
chart = alt.Chart(movie_data) \
    .mark_bar() \
    .encode(
        y=alt.Y('Production_Budget', title=""),
        x=alt.X('count()', sort='descending', title="")
    )
display(chart)

Screenshot 2021-12-07 at 11 20 39

Already tried

@rolyp rolyp changed the title Colours used chart for scatter plot example goes beyond data range Colours used: scatterplot example goes beyond data range Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant