You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of expected behavior and the observed behavior
When two or more holoviews plots are on the same page and the axes are linked. If you change the view (for example with mouse scroll) on one, then updated the data and the plots, it returns an error. Steps are as follows:
Show two holoviews panes
Scroll to changes axes limits, both adjust as expected
Refresh the data and update the plots.
Complete, minimal, self-contained example code that reproduces the issue
importpanelaspnimportpandasaspdimporthvplot.pandasimportholoviewsashvimportnumpyasnppn.extension('tabulator',sizing_mode='stretch_width')
hv.extension('bokeh', theme='dark')
classMREViewer(pn.viewable.Viewer):
plot1=pn.pane.HoloViews(sizing_mode='stretch_width')
plot2=pn.pane.HoloViews(sizing_mode='stretch_width')
reload_data_button=pn.widgets.Button(name='Reload Data')
@pn.depends('reload_data_button.clicks', watch=True,on_init=True))
defupdate_plots(self):
dates=pd.date_range('2021-01-01', periods=365)
data=pd.DataFrame({'Date': dates, 'Value': np.random.randn(365).cumsum()})
new_plot1=data.hvplot(x='Date', y='Value', title='Plot 1')
new_plot2=data.hvplot(x='Date', y='Value', title='Plot 2')
self.plot1.object=new_plot1self.plot2.object=new_plot2def__panel__(self):
# Include the reload_data_button in the layoutlayout=pn.Column(self.reload_data_button, self.plot1, self.plot2)
returnlayoutapp=MREViewer()
app.servable()
message: Message 'PATCH-DOC' content: {'events': [{'kind': 'MessageSent', 'msg_type': 'bokeh_event', 'msg_data': {'type': 'event', 'name': 'button_click', 'values': {'type': 'map', 'entries': [['model', {'id': 'p7196'}]]}}}]}
error: UFuncTypeError(<ufunc 'greater'>, (<class 'numpy.dtypes.DateTime64DType'>, <class 'numpy.dtypes._PyFloatDType'>, None))
numpy.exceptions.DTypePromotionError: The DType <class 'numpy.dtypes.DateTime64DType'> could not be promoted by <class 'numpy.dtypes._PyFloatDType'>. This means that no common DType exists for the given inputs. For example they cannot be stored in a single array unless the dtype is object. The full list of DTypes is: (<class 'numpy.dtypes.DateTime64DType'>, <class 'numpy.dtypes._PyFloatDType'>)
The above exception was the direct cause of the following exception:
...
if axis.start > axis.end:
^^^^^^^^^^^^^^^^^^^^^
numpy._core._exceptions._UFuncNoLoopError: ufunc 'greater' did not contain a loop with signature matching types (<class 'numpy.dtypes.DateTime64DType'>, <class 'numpy.dtypes._PyFloatDType'>) -> None
Screenshots or screencasts of the bug in action
After reload data clicked
Traceback shown above
I may be interested in making a pull request to address this
The text was updated successfully, but these errors were encountered:
This is specific to the case when the x-axis is datetime. No issue with numerical axes.
mayonnaisecolouredbenz7
changed the title
Holoviews panels and axis sharing after plot update
Holoviews panels and axis sharing after plot update - datetime axis
Mar 19, 2025
ALL software version info
panel==1.6.1
Software Version Info
Description of expected behavior and the observed behavior
When two or more holoviews plots are on the same page and the axes are linked. If you change the view (for example with mouse scroll) on one, then updated the data and the plots, it returns an error. Steps are as follows:
Complete, minimal, self-contained example code that reproduces the issue
Stack traceback and/or browser JavaScript console output
message: Message 'PATCH-DOC' content: {'events': [{'kind': 'MessageSent', 'msg_type': 'bokeh_event', 'msg_data': {'type': 'event', 'name': 'button_click', 'values': {'type': 'map', 'entries': [['model', {'id': 'p7196'}]]}}}]}
error: UFuncTypeError(<ufunc 'greater'>, (<class 'numpy.dtypes.DateTime64DType'>, <class 'numpy.dtypes._PyFloatDType'>, None))
numpy.exceptions.DTypePromotionError: The DType <class 'numpy.dtypes.DateTime64DType'> could not be promoted by <class 'numpy.dtypes._PyFloatDType'>. This means that no common DType exists for the given inputs. For example they cannot be stored in a single array unless the dtype is
object
. The full list of DTypes is: (<class 'numpy.dtypes.DateTime64DType'>, <class 'numpy.dtypes._PyFloatDType'>)The above exception was the direct cause of the following exception:
...
if axis.start > axis.end:
^^^^^^^^^^^^^^^^^^^^^
numpy._core._exceptions._UFuncNoLoopError: ufunc 'greater' did not contain a loop with signature matching types (<class 'numpy.dtypes.DateTime64DType'>, <class 'numpy.dtypes._PyFloatDType'>) -> None
Screenshots or screencasts of the bug in action
After reload data clicked

Traceback shown above
The text was updated successfully, but these errors were encountered: