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

Small improvements to hv.ImageStack #5945

Merged
merged 3 commits into from
Oct 17, 2023
Merged

Small improvements to hv.ImageStack #5945

merged 3 commits into from
Oct 17, 2023

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Oct 17, 2023

  • Adding simple HoverTool support if Bokeh 3.3 is installed
  • Allow more inputs type to ImageStack:
import numpy as np
import panel as pn

import holoviews as hv

hv.extension("bokeh")

data = np.asarray(
    [
        [[0, 1, 2], [1, 1, 2], [0, 1, 2]],
        [[1, 0, 1], [2, 2, 2], [3, 3, 3]],
        [[0, 1, 4], [7, 1, 3], [3, 5, 1]],
    ]
)
# And:
# data = (range(5, 8), range(10, 13), data) 

colors = ["red", "blue", "green"]
hv.ImageStack(data).opts(
    width=800, height=800, cmap=colors, num_colors=100, tools=["hover"]
)

@hoxbro hoxbro added this to the 1.18.0 milestone Oct 17, 2023
@hoxbro hoxbro changed the title Small improvements to hv.Imagestack Small improvements to hv.ImageStack Oct 17, 2023
@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2023

Codecov Report

Merging #5945 (c7b3a9c) into main (0292fce) will increase coverage by 0.00%.
The diff coverage is 95.74%.

@@           Coverage Diff           @@
##             main    #5945   +/-   ##
=======================================
  Coverage   88.57%   88.58%           
=======================================
  Files         315      315           
  Lines       65460    65504   +44     
=======================================
+ Hits        57984    58026   +42     
- Misses       7476     7478    +2     
Flag Coverage Δ
ui-tests 23.15% <6.38%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
holoviews/element/raster.py 80.00% <100.00%> (+0.27%) ⬆️
holoviews/tests/plotting/bokeh/test_rasterplot.py 98.70% <100.00%> (+0.16%) ⬆️
holoviews/plotting/bokeh/raster.py 84.58% <71.42%> (-0.51%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@hoxbro hoxbro merged commit c7aa7d0 into main Oct 17, 2023
10 checks passed
@hoxbro hoxbro deleted the image_stack2 branch October 17, 2023 18:52
Copy link

This pull request 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants