matplotlib axis label format

前端 未结 2 1850
名媛妹妹
名媛妹妹 2020-12-02 15:39

I am having an issue with the format of the tick labels of an axis. I disabled the offset from the y_axis:

ax1.ticklabel_format(style = \'sci\', useOffset=Fa         


        
2条回答
  •  -上瘾入骨i
    2020-12-02 16:27

    You should also specify axis and threshold limits:

    ax1.ticklabel_format(axis='y', style='sci', scilimits=(-2,2))
    

    This would use sci format on y axis when figures are out of the [0.01, 99] bounds.

提交回复
热议问题