-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Ensure .stack works on Areas with different vdims #5693
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5693 +/- ##
=======================================
Coverage 88.30% 88.30%
=======================================
Files 302 302
Lines 62605 62630 +25
=======================================
+ Hits 55281 55305 +24
- Misses 7324 7325 +1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Thank you. The changes look good to me. Will it be possible for you to add a unit test? You can use the original example and verify the Baseline is correct. This can be found here: The test can be added here: |
Ok, maybe something along these lines? df = pd.DataFrame({'x': [1, 2, 3], 'y_1': [1, 2, 3], 'y_2': [6, 4, 2], 'y_3': [8, 1, 2]})
overlay = hv.Overlay([hv.Area(df, kdims='x', vdims=col, label=col) for col in ['y_1', 'y_2', 'y_3']])
plot = hv.Area.stack(overlay)
baselines = [np.array([0, 0, 0]), np.array([1., 2., 3.]), np.array([7., 6., 5.])]
for n, baseline in zip(plot.data, baselines):
self.assertEqual(plot.data[n].data.Baseline, baseline) |
Yes. That looks good to me. |
Alright I guess the test should be included for all three backends? I see that there are There's also the |
It would be nice, but it is up to you if you want to do it.
Just ignore this. Operations are pretty cumbersome, and we want to add a test for your simple example. |
Thank you for PR 👍 |
You're welcome! |
Fixes #5689
I have yet to try this on main, but works fine on 1.15.4.