【发布时间】:2020-12-12 08:17:49
【问题描述】:
当我使用 f 字符串创建标签时,我无法让 LaTeX 大括号显示在我的 Matplotlib 图中。例如
fig, ax = plt.subplots(1, 3, figsize=(12,4), sharey=True)
fig.suptitle("$x_n = x_{n-1}^2$, " + f"$x_0={5:.2f}, \,r={6:.2f}, \,n \in {{ 0,\ldots,{7} }}$")
结果
如何在 Matplotlib 的 f 字符串中显示 LaTeX 大括号?
【问题讨论】:
-
如果它是相关的,(a)我也无法让settings for font name 产生任何效果,并且(b)我正在使用
%matplotlib widget。
标签: matplotlib latex f-string