Scientific notation colorbar in matplotlib

前端 未结 3 1610
名媛妹妹
名媛妹妹 2020-12-07 16:46

I am trying to put a colorbar to my image using matplotlib. The issue comes when I try to force the ticklabels to be written in scientific notation. How can I force the scie

3条回答
  •  情歌与酒
    2020-12-07 17:32

    You can specify the format of the colorbar ticks as follows:

    pl.colorbar(myplot, format='%.0e')
    

提交回复
热议问题