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

Putting Bars element with 2 kdims in Overlay results in empty plot #5835

Closed
TheoMathurin opened this issue Jul 27, 2023 · 1 comment · Fixed by #5850
Closed

Putting Bars element with 2 kdims in Overlay results in empty plot #5835

TheoMathurin opened this issue Jul 27, 2023 · 1 comment · Fixed by #5850
Labels
type: bug Something isn't correct or isn't working

Comments

@TheoMathurin
Copy link
Contributor

TheoMathurin commented Jul 27, 2023

HoloViews 1.17.0
Bokeh 3.2.1

Note that it will work if there is only one kdim or if it shares an axis with another plot or if you provide ylims in the options.

This bug appeared in 1.17.0. Take the example from the docs and display it within an Overlay element:

import numpy as np
import pandas as pd
import holoviews as hv
hv.extension('bokeh')

samples = 100
pets = ['Cat', 'Dog', 'Hamster', 'Rabbit']
genders = ['Female', 'Male']
pets_sample = np.random.choice(pets, samples)
gender_sample = np.random.choice(genders, samples)
count = np.random.randint(1, 5, size=samples)
df = pd.DataFrame({'Pets': pets_sample, 'Gender': gender_sample, 'Count': count})

bars = hv.Bars(df, kdims=['Pets', 'Gender']).aggregate(function=np.sum)
overlay = hv.Overlay([bars])

image

When you pan, the browser console says: "[bokeh] could not set initial ranges".

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants