0

I tried this code :

import holoviews as hv
import panel as pn
hv.extension('bokeh')

gspec = pn.GridSpec(width=800, height=600)
gspec[1, 0] = hv.HeatMap([(0, 0, 1), (0, 0, 10), (1, 0, 2), (1, 1, 3)])
gspec[2, 0] = hv.Curve([1, 2, 3])
gspec.show()

But I got following error message:

<bokeh.server.server.Server at 0x199dc103fc8> ERROR:bokeh.core.validation.check:E-1009 (INCOMPATIBLE_SCALE_AND_RANGE): A Scale is incompatible with one or more ranges on the same plot dimension: incompatibility on x-dimension: FactorRange(id='1076', ...)/LinearScale(id='1133', ...), incompatibility on y-dimension: FactorRange(id='1077', ...)/LinearScale(id='1135', ...) [Figure(id='1128', ...)]

What am I doing wrong or how can I combine a heatmap with a curve?

coder123
  • 27
  • 4
  • 1
    This works just fine for me. What version of HoloViews do you have? – philippjfr Jul 13 '20 at 11:39
  • I am using holoviews version 1.12.7-py_0 and panel version 0.6.4-py_0 – coder123 Jul 14 '20 at 09:54
  • Me either, I can repplicate your example. Only modification could be: `heatmap = hv.HeatMap([(0, 0, 1), (0, 0, 10), (1, 0, 2), (1, 1, 3)]) heatmap = heatmap.aggregate(function=np.mean) gspec[1, 0] = heatmap` (holoviews==1.13.2) – Tomasz Mikolajczyk Jul 17 '20 at 11:13

0 Answers0