How to render Latex markup using Python?

前端 未结 6 2235
离开以前
离开以前 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条回答
  •  萌比男神i
    2020-12-15 07:46

    Draw with matplotlib,

    import matplotlib.pyplot as plt
    a = r'\frac{a}{b}'
    ax=plt.subplot(111)
    ax.text(0.5,0.5,r"$%s$" %(a),fontsize=30,color="green")
    plt.show()
    

提交回复
热议问题