Matplotlib:正确的数学字体大小 [英] Matplotlib: correct math font size

查看:341
本文介绍了Matplotlib:正确的数学字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

matplotlib中的数学文本显示为比

显示的常规文本小
$ b

  ax.set_xlabel(r'Variable $ \\ \\ alpha $')

有关此问题的更多详细信息,请参阅Matplotlib:更改数学字体大小

公认的解决方案是将数学字体设置为常规字体。
然而,数学模式中的变量不是斜体,因为它们应该是。



我需要在数学模式下的变量和与文本大小相同的变量。 >

这是如何实现的,为什么这不是默认值?

解决方案

我已经报告了这个问题
https://github.com/matplotlib/matplotlib/问题/ 7778

在那里我了解到这是在matplotlib 2.0中修复的。



得到释放,它的工作!



请参阅更改为默认样式


Math text in matplotlib is rendered smaller than the regular text as show by

ax.set_xlabel(r'Variable $\alpha$')

Further details on this problem are found in Matplotlib: Change math font size.

The accepted solution was setting math font to regular font. But then variable in math mode are not italic as they should be.

I need variables in math mode and of the same size as text.

How can this be achieved and why is this not the default?

解决方案

I have reported this issue at https://github.com/matplotlib/matplotlib/issues/7778.

There I learned that this is fixed in matplotlib 2.0.

This got released and it works!

See Changes to the default style.

这篇关于Matplotlib:正确的数学字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆