panel icon indicating copy to clipboard operation
panel copied to clipboard

Regression of Issue #845 (Only first tab of Tabs re-renders datashader plot)

Open andr-kun opened this issue 6 months ago • 2 comments

ALL software version info

panel: 1.4.4 holoviews: 1.19.1 datashader: 0.16.3 bokeh: 3.4.3

Description of expected behavior and the observed behavior

The latest version of panel seems to have re-introduced the issue raised in #845, which was previously fixed and was working on earlier version of panel (tested previously working version was 1.3.4).

I discovered this issue while testing to see if the latest version of panel has fixed the issue I raised in #6001.

Complete, minimal, self-contained example code that reproduces the issue

This code example below is taken from #845.

import holoviews as hv
import numpy as np
import panel as pn
import pandas as pd
from holoviews.operation.datashader import dynspread, datashade, rasterize, shade
from holoviews.operation import decimate
import datashader as ds

pn.extension()

N = 1000000
x = np.random.random(N)
y = np.random.random(N)

dset = hv.Dataset(pd.DataFrame({'x': x,
                              'y': y, 
                              'z1': x*y,
                              'z2': -x*y}))

pts1 = hv.Points(dset, kdims=['x', 'y'], vdims=['z1'])
pts2 = hv.Points(dset, kdims=['x', 'y'], vdims=['z2'])

agg1 = ds.mean('z1')
agg2 = ds.mean('z2')

opts = dict(height=800, width=800)

plot1 = datashade(pts1, aggregator=agg1).options(**opts) * decimate(pts1)
plot2 = datashade(pts2, aggregator=agg2).options(**opts) * decimate(pts2)

plots = [('z1', pn.panel(plot1)), ('z2', pn.panel(plot2))]

pn.Tabs(*plots)

Screenshots or screencasts of the bug in action

https://github.com/user-attachments/assets/a853225b-3d58-4864-90d9-e46fb6d168ca

andr-kun avatar Aug 01 '24 17:08 andr-kun