Modify tick label text

前端 未结 10 1475
遥遥无期
遥遥无期 2020-11-22 07:13

I want to make some modifications to a few selected tick labels in a plot.

For example, if I do:

label = axes.yaxis.get_major_ticks()[2].label
label         


        
10条回答
  •  爱一瞬间的悲伤
    2020-11-22 08:20

    This also works in matplotlib 3:

    x1 = [0,1,2,3]
    squad = ['Fultz','Embiid','Dario','Simmons']
    
    plt.xticks(x1, squad, rotation=45)
    

提交回复
热议问题