【问题标题】:Hide xtitle but keep ticklabels in dash plotly隐藏标题但在破折号中保留刻度标签
【发布时间】:2021-03-25 15:13:40
【问题描述】:

我想删除折线图上的date 图例,但保留ticklabels。这就是我如何处理fig.update,但这似乎删除了两者。

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

这是我的理想结果。

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

【问题讨论】:

    标签: plotly plotly-dash plotly-python


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2016-08-30
      • 1970-01-01
      • 1970-01-01
      • 2014-01-23
      • 2012-06-10
      • 1970-01-01
      • 1970-01-01
      • 2018-12-04
      相关资源
      最近更新 更多