• Python-Matplotlib 20 Tex公式


    Python-Matplotlib 20 Tex公式

    1 概念
      matplotlib自带的mathtext引擎,不需要安装TeX系统  
      $作为开始和结束符,如"$y=x+x $"

    EG1 

    import numpy as np
    import matplotlib.pyplot as plt
    
    fig = plt.figure()
    ax = fig.add_subplot(111)
    ax.set_xlim([1,7])
    ax.set_ylim([1,5])
    
    ax.text(2,4, r'$ alpha_i eta_j pi lambda omega $' , size=15)
    
    ax.text(4,4, r'$ sin(0) = cost (frac {pi} {2}) $' , size=15)
    
    ax.text(2,2 , r'$ lim_{x 
    ightarrow y} frac{1} {x^3} $', size=15)
    
    ax.text(4,2 , r'$ sqrt[4] {x} = sqrt {y} $', size=15)
    plt.show()
    

      

  • 相关阅读:
    2.19
    2.16sqlite
    2.14Android6
    2.12Android5
    2.11Android4
    2.09Android3
    2.08Android2
    2.06Android学习
    dpdk bond
    ContainerCreating
  • 原文地址:https://www.cnblogs.com/zsr0401/p/6428509.html
Copyright © 2020-2023  润新知