This seems not possible yet with .opts(xticks=[]) in Holoviews/Bokeh:
https://github.com/pyviz/holoviews/issues/2128
One (difficult) way of solving this could be using the answer to this SO-question if you're on a Mac, but I don't really like it:
Changing ticks mark period in Holoviews heatmap
WORKAROUND:
I think the easiest for now would be to just change the category_names before you plot the heatmap, like so:
df['col1'] = df['col1'].replace({1: 'a', 2: 'b'})
Here's the full example code for changing category labels of a heatmap:
# import libraries
import pandas as pd
import holoviews as hv
hv.extension('bokeh', logo=False)
# create dataframe
sample_data = [(1, 1, 1), (1, 2, 10), (2, 1, 2), (2, 2, 3)]
df = pd.DataFrame(
data=sample_data,
columns=['col1', 'col2', 'col3'],
)
# replace original category labels with labels that you need
df['col1'] = df['col1'].replace({1: 'a', 2: 'b'})
# show plot with new category labels
hv.HeatMap(df)
Final result where original category labels 1 and 2 have been replaced on the x-axis by 'a' and 'b':