How to render Latex markup using Python?

前端 未结 6 2227
离开以前
离开以前 2020-12-15 07:02

How to show an easy latex-formula in python? Maybe numpy is the right choice?

EDIT:

I have python code like:

a = \'\\frac{a}{b}\'
         


        
6条回答
  •  伪装坚强ぢ
    2020-12-15 07:49

    Without ticks:

    a = r'\frac{a}{b}'
    ax = plt.axes([0,0,0.1,0.2]) #left,bottom,width,height
    ax.set_xticks([])
    ax.set_yticks([])
    plt.text(0.3,0.4,'$%s$' %a,size=40)
    

提交回复
热议问题