How to write your own LaTeX preamble in Matplotlib?

前端 未结 1 610
误落风尘
误落风尘 2020-12-06 16:56

I\'m trying to create a figure in matplotlib to insert in my LaTeX document, and I need the bold \'i\' and \'j\' symbols

相关标签:
1条回答
  • 2020-12-06 17:34

    When I need to use LaTeX with matplotlib, I add the following to the python script (+ additional commands for debug info)

     import matplotlib.pyplot as plt
    
     plt.rc('text', usetex=True)
     plt.rc('text.latex', preamble=r'\usepackage{amsmath}
              \usepackage{foo-name} `...')
     matplotlib.verbose.level = 'debug-annoying'
    

    commands to make your plot here

    0 讨论(0)
提交回复
热议问题