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

Account for overlaid elements when using subcoordinates_y #5950

Merged
merged 3 commits into from
Oct 24, 2023
Merged

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Oct 23, 2023

Fixes #5913

import holoviews as hv
import numpy as np
import panel as pn

np.random.seed(100)
hv.extension("bokeh")

fn = lambda channel: hv.Curve(
    (np.arange(10), np.random.rand(10), channel), "Time", "Channel", label=channel
).opts(subcoordinate_y=True)
subcoord = hv.Overlay([fn(n) for n in "ABCD"], kdims="Channel")
annotation = hv.VSpan(1, 1.5)

pn.panel(annotation * subcoord).servable()
pn.panel(subcoord * annotation).servable()
pn.panel(subcoord).servable()
pn.panel(annotation * subcoord + subcoord * annotation).servable()

image

TODO:

  • Add tests

@hoxbro hoxbro marked this pull request as draft October 23, 2023 08:47
@hoxbro hoxbro changed the title Check alignment of previous plots for subcoordinates Account for overlaid elements when using subcoordinates_y Oct 23, 2023
@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2023

Codecov Report

Merging #5950 (1046081) into main (ad31eda) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5950      +/-   ##
==========================================
- Coverage   88.58%   88.56%   -0.02%     
==========================================
  Files         315      315              
  Lines       65511    65523      +12     
==========================================
+ Hits        58031    58033       +2     
- Misses       7480     7490      +10     
Flag Coverage Δ
ui-tests 23.14% <14.28%> (-0.01%) ⬇️

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

Files Coverage Δ
holoviews/plotting/bokeh/element.py 88.38% <100.00%> (+0.01%) ⬆️
holoviews/tests/plotting/bokeh/test_subcoordy.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

@hoxbro hoxbro marked this pull request as ready for review October 24, 2023 07:03
@hoxbro hoxbro merged commit bb81fe0 into main Oct 24, 2023
10 checks passed
@hoxbro hoxbro deleted the subcoord_fix branch October 24, 2023 07:03
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.

subcoordinate_y y-tick misalignment when overlaying VSpan
3 participants