How to get rid of the original yticks/yticklabels when I use ax.set_yscale('log')

前端 未结 1 1982
再見小時候
再見小時候 2021-01-28 00:52

I am plotting some values in a semilogy plot. I need to use the

ax.set_yscale(\'log\')

rather than

ax.semilogy(...
相关标签:
1条回答
  • 2021-01-28 01:16

    The labels shown are minor ticklabels. You may set the minor ticks to an empty list to get rid of them.

    ax.set_yticks([], minor=True)
    

    or just set the minor ticks off,

    ax.minorticks_off()
    
    0 讨论(0)
提交回复
热议问题