importing hvplot.pandas and hvplot.xarray changes extension to bokeh
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 124
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Description
#### ALL software version info
Software Version Info
```plaintext
Python 3.14.6
hvplot 0.12.2
```
#### Description of expected behavior and the observed behavior
Expected: importing hvplot.pandas and hvplot.xarray should not call hvplot.extension nor adjust hvplot.Store.current_backend.
Observed: importing either of these seems to always swap the backend to bokeh.
This affects downstream: UXarray/uxarray#1541
#### Complete, minimal, self-contained example code that reproduces the issue
```python
import hvplot
hvplot.extension("matplotlib")
print('A:', hvplot.Store.current_backend)
import hvplot.pandas
print('B:', hvplot.Store.current_backend)
hvplot.extension("matplotlib")
print('C:', hvplot.Store.current_backend)
import hvplot.xarray
print('D:', hvplot.Store.current_backend)
```
Expected hvplot.Store.current_backend to always be "matplotlib". But, these lines actually print out:
```
A: matplotlib
B: bokeh
C: matplotlib
D: bokeh
```
Contributor guide
Research direction
Start with the minimal reproduction using hvplot.extension, hvplot.pandas, hvplot.xarray, and Store.current_backend, then trace those import entry points to find where the backend changes. Done means importing either module preserves the selected matplotlib backend, with regression coverage for both imports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100