holoviz / holoviz/hvplot

Pandas `.heatmap()` doesn't respect `show_values()` with matplotlib

Open
#1,328 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
124
Avg merge
1d 18h
Merged PRs (30d)
1

Description

#### ALL software version info

From `hv.show_versions()`:

```
Python : 3.12.2 | packaged by conda-forge | (main, Feb 16 2024, 20:54:21) [Clang 16.0.6 ]
Operating system : macOS-14.4.1-arm64-arm-64bit
Panel comms : default

holoviews : 1.18.3

bokeh : 3.4.0
colorcet : 3.1.0
cudf : -
dask : -
datashader : -
geoviews : -
hvplot : 0.9.2
ibis-framework : -
IPython : 8.20.0
jupyter_bokeh : -
jupyterlab : 4.0.11
matplotlib : 3.8.0
networkx : 3.1
notebook : -
numba : -
numpy : 1.26.4
pandas : 2.2.1
panel : 1.4.1
param : 2.1.0
pillow : 10.2.0
plotly : -
pyarrow : 14.0.2
pyviz_comms : 3.0.2
scikit-image : -
scipy : 1.12.0
spatialpandas : -
streamz : -
tsdownsample : -
xarray : -
```

#### Description of expected behavior and the observed behavior

I am trying to disable the text value annotations on a heatmap when plotting via pandas and matplotlib. `hv.help(hv.HeatMap, backend="matplotlib")` shows that `show_values=False` should disable these annotations, but when I use it I get a warning: `WARNING:param.main: show_values option not found for heatmap plot with matplotlib; similar options include: []`.

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

```
import holoviews as hv
hv.extension("matplotlib")
import hvplot.pandas

from bokeh.sampledata import sea_surface_temperature as sst

df = sst.sea_surface_temperature

df.hvplot.heatmap(x='time.month', y='time.day', C='temperature',
show_values=False,
height=500, width=500, colorbar=False)
```

#### Screenshots or screencasts of the bug in action

![Screenshot 2024-04-23 at 11 09 42 AM](https://github.com/holoviz/hvplot/assets/61438033/fc1b6880-db0f-468a-a67b-063d222d810b)

- [x] I may be interested in making a pull request to address this

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.