【问题标题】:Using special character \ddagger in matplotlib equation label without latex在没有乳胶的 matplotlib 方程标签中使用特殊字符 \ddagger
【发布时间】:2018-09-01 07:57:01
【问题描述】:

正如标题所说,我想在标题和标签方程中使用 matplotlib 方程渲染(而不是通过 rc 选项切换到乳胶渲染),因为它更快,而且我喜欢字体和样式。但是,它似乎不支持 $\ddagger$ 符号。我收到错误消息:

Unknown symbol: \ddagger (at char 31), (line:1, col:32)

有趣的是所有其他符号,如 \dagger 一样。任何帮助将不胜感激。

【问题讨论】:

    标签: python matplotlib latex


    【解决方案1】:

    \ddagger 符号的 unicode 为 2021。因此,使用 STIX 字体集(查找所有符号表 here)您应该能够将其写为

    ax.set_title(u"\ddagger $\u2021$")
    

    【讨论】:

      猜你喜欢
      • 2017-08-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-05
      • 1970-01-01
      • 2020-01-02
      • 2012-07-07
      • 1970-01-01
      相关资源
      最近更新 更多