Superscript in Python plots

后端 未结 3 522
北海茫月
北海茫月 2020-12-13 06:18

I want to label my x axis at follows :

pylab.xlabel(\'metres 10^1\')

But I don\'t want to have the ^ symbol included .

pyla         


        
3条回答
  •  甜味超标
    2020-12-13 06:33

    Alternatively, in python 3.6+, you can generate Unicode superscript and copy paste that in your code:

    ax1.set_ylabel('Rate (min⁻¹)')
    

提交回复
热议问题