# hvplot.interactive vs pn.rx - Recommendation for new code?

**URL:** <https://discourse.holoviz.org/t/hvplot-interactive-vs-pn-rx-recommendation-for-new-code/8903>\
**Category:** hvPlot\
**Created:** [August 19, 2025, 5:51pm UTC](https://discourse.holoviz.org/t/hvplot-interactive-vs-pn-rx-recommendation-for-new-code/8903 "2025-08-19T17:51:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ewd](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/ewd/32/7322_2.png) [@ewd](https://discourse.holoviz.org/u/ewd)\
**Post date:** [August 19, 2025, 5:51pm UTC](https://discourse.holoviz.org/t/hvplot-interactive-vs-pn-rx-recommendation-for-new-code/8903/1 "2025-08-19T17:51:10Z")

</div>

Based on some discussions and changes on github, it seems that hvplot.interactive is no longer the recommended approach for building interactive plots?

> <https://github.com/holoviz/panel/issues/5891>
>
> Please convert this one https://panel.holoviz.org/how\_to/interactivity/hvplot\_in…teractive.html to \`param.rx\` syntax such that users like rh1 in https://discourse.holoviz.org/t/param-value-if-widget-interactive-widget/6375 does not start to learn the legacy way to do things.

The documentation for Panel and overall Holoviz tutorial both seem to prefer pn.rx instead.

That said, the documentation for hvplot still includes a section on using hvplot.interactive: [Interactive — hvPlot 0.12.0 documentation](https://hvplot.holoviz.org/en/docs/latest/user_guide/Interactive.html) but hvplot.interactive does not seem to have its own reference page in the hvplot API documentation.

Is hvplot.interactive still a good way of building interactive plots or has it been soft depreciated?

---

<div class="post-metadata">

**Author:** ![droumis](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/droumis/32/1674_2.png) [@droumis](https://discourse.holoviz.org/u/droumis)\
**Post date:** [August 22, 2025, 4:57pm UTC](https://discourse.holoviz.org/t/hvplot-interactive-vs-pn-rx-recommendation-for-new-code/8903/2 "2025-08-22T16:57:28Z")

</div>

Indeed, there’s been discussion about phasing it out in favor of other interactive approaches. Are you making use of it? We definitely would like to hear about your use case, if so

---

<div class="post-metadata">

**Author:** ![ahuang11](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/ahuang11/32/4947_2.png) [@ahuang11](https://discourse.holoviz.org/u/ahuang11)\
**Post date:** [August 22, 2025, 5:06pm UTC](https://discourse.holoviz.org/t/hvplot-interactive-vs-pn-rx-recommendation-for-new-code/8903/3 "2025-08-22T17:06:53Z")

</div>

Here’s a guide on rx

> **[rx Marks the Spot: A Prescription for Reactive Python](https://medium.com/@pYdeas/rx-marks-the-spot-a-prescription-for-reactive-python-bdf25e5bf727)**
>
> Nearly any Python expression can now be made reactive with param.rx(), at which point it will collect and be able to replay any operations…

However, IIRC rx doesn’t natively work with hvplot which is why interactive is still available…? [hvplot.show fails with panel reactive object · Issue #1647 · holoviz/hvplot · GitHub](https://github.com/holoviz/hvplot/issues/1647)

---

<div class="post-metadata">

**Author:** ![ewd](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/ewd/32/7322_2.png) [@ewd](https://discourse.holoviz.org/u/ewd)\
**Post date:** [August 22, 2025, 9:42pm UTC](https://discourse.holoviz.org/t/hvplot-interactive-vs-pn-rx-recommendation-for-new-code/8903/4 "2025-08-22T21:42:24Z")

</div>

I haven’t been making use of it yet, I went through the hvPlot tutorials first before the other Holoviz/Panel tutorials/documentation and tried the hvplot.interactive approach for my app before getting stuck and looking for alternatives. That led me to reading more about pn.rx and pn.bind (which ended up working for my use case). I was more so wondering about best practices for new apps and where to invest my time learning.

So it sounds like hvplot.interactive doesn’t provide any functionality beyond what can be already accomplished with pn.rx or pn.bind. I’ll likely just not bother trying to use hvplot.interactive moving forwards then.

---

<div class="post-metadata">

**Author:** ![ewd](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/ewd/32/7322_2.png) [@ewd](https://discourse.holoviz.org/u/ewd)\
**Post date:** [August 22, 2025, 9:45pm UTC](https://discourse.holoviz.org/t/hvplot-interactive-vs-pn-rx-recommendation-for-new-code/8903/5 "2025-08-22T21:45:34Z")

</div>

Thanks for that guide, I came across it earlier and it definitely helped solidify my understanding of param.rx. Based on the examples in the documentation, it seems like hvplot does work with rx objects?

[https://panel.holoviz.org/how\_to/interactivity/hvplot\_interactive.html#../../reference/panes/ReactiveExpr](https://panel.holoviz.org/how_to/interactivity/hvplot_interactive.html#../../reference/panes/ReactiveExpr)

---

<div class="post-metadata">

**Author:** ![ahuang11](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/ahuang11/32/4947_2.png) [@ahuang11](https://discourse.holoviz.org/u/ahuang11)\
**Post date:** [August 22, 2025, 10:00pm UTC](https://discourse.holoviz.org/t/hvplot-interactive-vs-pn-rx-recommendation-for-new-code/8903/6 "2025-08-22T22:00:26Z")

</div>

I haven’t tested, but I remember vaguely something like:

`df.hvplot(x=some_widget.rx().some_expression)` didn’t work

The best practices are here if you haven’t seen it yet; it’s a bit hidden…  
[https://panel.holoviz.org/how\_to/best\_practices/index.html](https://panel.holoviz.org/how_to/best_practices/index.html)

I guess it should also mention when to use rx vs bind

---

<div class="post-metadata">

**Author:** ![ahuang11](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/ahuang11/32/4947_2.png) [@ahuang11](https://discourse.holoviz.org/u/ahuang11)\
**Post date:** [September 12, 2025, 9:08pm UTC](https://discourse.holoviz.org/t/hvplot-interactive-vs-pn-rx-recommendation-for-new-code/8903/7 "2025-09-12T21:08:28Z")

</div>

> <https://github.com/holoviz/hvplot/issues/1676>
>
> \`\`\`python
> import numpy as np
> import panel as pn
> import pandas as pd
> import hvplo…t.pandas
> pn.extension()
> 
> select = pn.widgets.Select(value="c", options=\["c", "c2"\])
> df = pd.DataFrame({"x": np.linspace(0, 10, 100), "y": np.random.randn(100).cumsum(), "y2": np.random.randn(100).cumsum(), "Category": np.random.choice(\["Biology", "Chemistry", "Physics"\], 100), "Category 2": np.random.choice(\["Biology", "Chemistry", "Physics"\], 100)})
> df.hvplot.line(x="x", y="y", groupby=select.param.value.rx().rx.pipe(lambda x: "Category" if x == "c" else "Category 2"))
> \`\`\`
> 
> \`\`\`python
> \---------------------------------------------------------------------------
> TypeError Traceback (most recent call last)
> Cell In\[9\], line 9
> 7 select = pn.widgets.Select(value="c", options=\["c", "c2"\])
> 8 df = pd.DataFrame({"x": np.linspace(0, 10, 100), "y": np.random.randn(100).cumsum(), "y2": np.random.randn(100).cumsum(), "Category": np.random.choice(\["Biology", "Chemistry", "Physics"\], 100), "Category 2": np.random.choice(\["Biology", "Chemistry", "Physics"\], 100)})
> \----\> 9 df.hvplot.line(x="x", y="y", groupby=select.param.value.rx().rx.pipe(lambda x: "Category" if x == "c" else "Category 2"))
> 
> File ~/repos/hvplot/hvplot/plotting/core.py:372, in hvPlotTabular.line(self, x, y, \*\*kwds)
> 275 def line(self, x=None, y=None, \*\*kwds):
> 276 """
> 277 The \`line\` plot connects the points with a continuous curve.
> 278 
> (...)
> 370 - Wiki: https://en.wikipedia.org/wiki/Line\_chart
> 371 """
> \--\> 372 return self(x, y, kind='line', \*\*kwds)
> 
> File ~/repos/hvplot/hvplot/plotting/core.py:95, in hvPlotBase.\_\_call\_\_(self, x, y, kind, \*\*kwds)
> 92 plot = self.\_get\_converter(x, y, kind, \*\*kwds)(kind, x, y)
> 93 return pn.panel(plot, \*\*panel\_dict)
> \---\> 95 return self.\_get\_converter(x, y, kind, \*\*kwds)(kind, x, y)
> 
> File ~/repos/hvplot/hvplot/converter.py:1859, in HoloViewsConverter.\_\_call\_\_(self, kind, x, y)
> 1856 dataset = redim\_(dataset, \*\*self.\_redim)
> 1858 if groups:
> \-\> 1859 datasets = dataset.groupby(groups, dynamic=self.dynamic)
> 1860 if len(zs) \> 1:
> 1861 dimensions = \[Dimension(self.group\_label, values=zs)\] + datasets.kdims
> 
> File ~/miniconda3/envs/lumen/lib/python3.12/site-packages/holoviews/core/data/\_\_init\_\_.py:201, in PipelineMeta.pipelined.\<locals\>.pipelined\_fn(\*args, \*\*kwargs)
> 198 inst.\_in\_method = True
> 200 try:
> \--\> 201 result = method\_fn(\*args, \*\*kwargs)
> 202 if PipelineMeta.disable:
> 203 return result
> 
> File ~/miniconda3/envs/lumen/lib/python3.12/site-packages/holoviews/core/data/\_\_init\_\_.py:1059, in Dataset.groupby(self, dimensions, container\_type, group\_type, dynamic, \*\*kwargs)
> 1056 if not dimensions: dimensions = self.dimensions('key', True)
> 1057 if group\_type is None: group\_type = type(self)
> \-\> 1059 dimensions = \[self.get\_dimension(d, strict=True) for d in dimensions\]
> 1060 dim\_names = \[d.name for d in dimensions\]
> 1062 if dynamic:
> 
> File ~/miniconda3/envs/lumen/lib/python3.12/site-packages/holoviews/core/dimension.py:1020, in Dimensioned.get\_dimension(self, dimension, default, strict)
> 1004 """Get a Dimension object by name or index.
> 1005 
> 1006 Parameters
> (...)
> 1017 Dimension object for the requested dimension or default
> 1018 """
> 1019 if dimension is not None and not isinstance(dimension, (int, str, Dimension)):
> \-\> 1020 raise TypeError('Dimension lookup supports int, string, '
> 1021 'and Dimension instances, cannot lookup '
> 1022 f'Dimensions using {type(dimension).\_\_name\_\_} type.')
> 1023 all\_dims = self.dimensions()
> 1024 if isinstance(dimension, int):
> 
> TypeError: Dimension lookup supports int, string, and Dimension instances, cannot lookup Dimensions using rx type.\`\`\`
