【问题标题】:Change the latex math font style in matplotlib更改 matplotlib 中的乳胶数学字体样式
【发布时间】:2019-06-08 12:15:34
【问题描述】:

使用 Latex 时如何更改 matplotlib 中的数学字体样式。例如,我有

matplotlib_font$_{latex_font}$

matplotlib_font 显示为我的 rc 文件中设置的字体,而 Latex_font 是现代计算机。我不希望我所有的字体都用乳胶,即。我想将 rc 文件保留为

text.usetex         : False 

但我需要我的乳胶字体来匹配我的 matplotlib 字体。

【问题讨论】:

    标签: python matplotlib


    【解决方案1】:

    想通了,在 rc (matplotlibrc) 文件集中

    mathtext.fontset : custom
    

    然后用数学模式下需要的字体更新数学文本

    mathtext.rm  : Times New Roman
    mathtext.it  : Times New Roman:italic
    mathtext.bf  : Times New Roman:bold
    

    【讨论】:

    • 我删除了mathtext.tt : Times New Roman,因为我不认为这是必要的,因为 LaTex 不使用它。
    猜你喜欢
    • 1970-01-01
    • 2018-09-23
    • 2019-05-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-07
    • 1970-01-01
    • 2014-01-10
    相关资源
    最近更新 更多