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

Added warning when datashading with multi_y=True #5829

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jlstevens
Copy link
Contributor

Simple PR to address #5823

Now that RangeXY is extra axis aware, you still need to overlay rasterize calls to datashade with multi_y=True. This PR adds such a warning/suggestion for the user until we can support a RangeXMultiY stream (or similar).

@jlstevens
Copy link
Contributor Author

Note that I am hardcoding 'bokeh' as the backend: multi_y is currently only supported by bokeh anyway so I am making the assumption that any presence of multi_y means Bokeh is being used.

@codecov-commenter
Copy link

codecov-commenter commented Jul 25, 2023

Codecov Report

Merging #5829 (5872e52) into main (2ab0ebf) will decrease coverage by 0.01%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##             main    #5829      +/-   ##
==========================================
- Coverage   88.23%   88.23%   -0.01%     
==========================================
  Files         309      309              
  Lines       63866    63872       +6     
==========================================
+ Hits        56354    56359       +5     
- Misses       7512     7513       +1     
Flag Coverage Δ
ui-tests 23.39% <16.66%> (-0.01%) ⬇️

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

Files Changed Coverage Δ
holoviews/operation/resample.py 89.91% <83.33%> (-0.35%) ⬇️

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

def __call__(self, element, **kwargs):
opts = element.opts.get('plot', 'bokeh')
opts = {} if opts is None else opts.kwargs
if 'multi_y' in opts:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if 'multi_y' in opts:
if 'multi_y' in opts and isinstance(element, CompositeOverlay):

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure that's quite right, but I don't see a good reason to warn if you just provide an Element. Also the multi_y may be set after the fact and then this warning won't do anything. So overall I don't think this approach is very good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Where would you warn from when using datashader with multi_y=True then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One other alternative of course is to not warn at all and to document this instead...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants