Python hide ticks but show tick labels

前端 未结 9 824
Happy的楠姐
Happy的楠姐 2020-12-07 11:23

I can remove the ticks with

ax.set_xticks([]) 
ax.set_yticks([]) 

but this removes the labels as well. Any way I can plot the tick labels b

9条回答
  •  醉话见心
    2020-12-07 11:35

    Currently came across the same issue, solved as follows on version 3.3.3:

    My matplotlib ver: 3.3.3
    
    ax.tick_params(tick1On=False) for left and bottom ticks
    ax.tick_params(tick2On=False) for right and top ticks, which are off by default
    

提交回复
热议问题