Hiding tick labels on colorbar does not work

I’m trying to remove tick labels from a figure generated using px.imshow

fig = px.imshow(df)

However, when I use the following command:

fig.update_coloraxes(colorbar_showticklabels=False)

the figure does not show up any more. I’m using Plotly 5.18.0 and Python 3.9.13 on Windows 10. Is this a bug or am I overlooking something?

Hey @vskorjanc welcome to the forums.

I can’t reproduce this. Are you using jupyter notebooks?

Hi @AIMPED, thank you for looking into this :slight_smile: Yes, I’m using Jupyter notebook (within Visual Studio Code).

I was also initially getting an empty HTML if I export the figure as HTML, however now when I checked it again, everything looks good so it seems to indeed be a problem related to Jupyter Notebooks.

1 Like

There are indeed some incompatibilities with jupyter >= 4, we have some threads about this. At the moment, the recommendation is to use jupyter<4

pip install jupyterlab<4.0

1 Like