隐藏 x 标题但将刻度标签保留在破折号中

Hide xtitle but keep ticklabels in dash plotly

我想删除折线图上的 date 图例,但保留 ticklabels。这是我做 fig.update 的方法,但这似乎同时删除了两者。

fig.update_xaxes(visible=False, showticklabels=True)
fig.update_yaxes(showline=True, linewidth=.25, gridcolor='#DCDCDC')

这是我的理想结果。

如何编写 fig.update 以获得理想的输出?

更新X轴时,可以这样写:

fig.update_xaxes(title_text='', showticklabels=True)