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

Radial HeatMap option doesn't work with Dataset.to #2610

Closed
toddrjen opened this issue Apr 23, 2018 · 3 comments
Closed

Radial HeatMap option doesn't work with Dataset.to #2610

toddrjen opened this issue Apr 23, 2018 · 3 comments
Milestone

Comments

@toddrjen
Copy link

@toddrjen toddrjen commented Apr 23, 2018

Radial HeatMaps work when declaring a HeatMap directly, but don't seem to work when using Dataset.to. Consider the following Dataset:

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

x = np.arange(0, 1000)
y = np.sin(x/1000*2*np.pi)
index = x//10
rep = x%10
thirds = x%3==0

df = pd.DataFrame({"Value": y, "Index": index, "Repetition": rep, "Thirds": thirds})
ds = hv.Dataset(df, ['Repetition', 'Index', 'Thirds'], ['Value'])

If we select one value of Thirds and make a radial HeatMap with that, it works properly:

%opts HeatMap [radial=True]
hv.HeatMap(ds.select(Thirds=True), ['Index', 'Repetition'])

bokeh_plot

However, if we use Dataset.to on the same data to get a dropdown, the HeatMap isn't radial:

%opts HeatMap [radial=True]
ds.to(hv.HeatMap, ['Index', 'Repetition'])

bokeh_plot 1

I would be willing to use an ugly workaround to get this working if it is available.

@philippjfr philippjfr added this to the v1.10.x milestone Apr 23, 2018
@toddrjen
Copy link
Author

@toddrjen toddrjen commented Apr 24, 2018

It looks like overlays don't work, either.

Using the same Dataset as above, ds, this works:

%opts HeatMap [radial=True]
hm1 = hv.HeatMap(ds.select(Thirds=True), ['Index', 'Repetition'])
hm1

bokeh_plot 2

And this works

%opts HeatMap [radial=True]
hm2 = hv.HeatMap(ds.select(Thirds=False), ['Index', 'Repetition'])
hm2

bokeh_plot 3

And this works:

%opts HeatMap [radial=True]
hm1 + hm2

bokeh_plot 5bokeh_plot 3

But this doesn't:

%opts HeatMap [radial=True]
hm1*hm2

bokeh_plot 4

@toddrjen
Copy link
Author

@toddrjen toddrjen commented Apr 24, 2018

There is also no colorbar with radial heatmaps:

%%opts HeatMap [radial=True colorbar=True]
hv.HeatMap(ds.select(Thirds=True), ['Index', 'Repetition'])

Doesn't show any legend.

@philippjfr
Copy link
Member

@philippjfr philippjfr commented Apr 24, 2018

Thanks, hopefully we can get a fix for this into 1.10.2.

@philippjfr philippjfr removed this from the v1.10.x milestone Apr 24, 2018
@philippjfr philippjfr added this to the v1.10.2 milestone Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants