Matplotlib中文显示问题——用例子说明问题

#-*- coding: utf-8 -*-

from pylab import *

t = arange(-4*pi, 4*pi, 0.01)

y = sin(t)/t

plt.plot(t, y)

plt.title('test')

plt.xlabel(u'\u2103',fontproperties='SimHei')

#在这里,u'\u2103'是摄氏度,前面的u代表unicode,而引号里的内容,是通过在网上查找“℃”这一个符号的unicode编码得到的。这里的“摄氏度”是中文,要显示的话需要在后面加上fontproperties属性即可,这里设置的字体为黑体。

plt.ylabel(u'幅度',fontproperties='SimHei')#也可以直接显示中文。

plt.show()

 

可以这样使用:ylabel('Rice('+r'$\mu\mathrm{mol}$'+' '+'$ \mathrm{m}^{-2} \mathrm{s}^{-1}$'+')')。

 

 

中文与LaTex共同显示问题:

在坐标轴标题中同时显示中文以及带有上下标的各种数学单位,需要分两步:

      1、根据上述显示中文的方法,先将中文标题加上;

      2、对于单位,使用text函数进行添加,text函数用法见(http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.text)。

 

import matplotlib.pyplot as plt

import numpy as np

t = np.linspace(0, 10, 1000)

y = np.sin(t)

plt.plot(t, y,label=u'正弦曲线 (m)')

plt.xlabel(u"时间", fontproperties='SimHei')

plt.ylabel(u"振幅", fontproperties='SimHei')

plt.title(u"正弦波", fontproperties='SimHei'

# 添加单位

t=plt.text(6.25, -1.14,r'$(\mu\mathrm{mol}$'+' '+'$ \mathrm{m}^{-2} \mathrm{s}^{-1})$',fontsize=15, horizontalalignment='center',verticalalignment='center')

#在这里设置是text的旋转,0为水平,90为竖直

t.set_rotation(0)           

# legend中显示中文

plt.legend(prop={'family':'SimHei','size':15}) 

 

plt.savefig("C:\\Users\\Administrator\\Desktop\\test.png")

 

编写数学表达式

你可以在任何 matplotlib 文本字符串中使用子 TeX 标记,将它放在一对美元符号($)内。

注意,你不需要安装 TeX,因为 matplotlib 提供了自己的 TeX 表达式解析器,布局引擎和字体。 布局引擎是 Donald Knuth 的 TeX 中的布局算法的一种相当直接的适配版,所以质量是相当不错的(matplotlib 还为那些想要调用 TeX 生成文本的人提供一个usetex选项(参见使用 LaTeX 渲染文本 )。

任何文本元素都可以使用数学文本。 你应该使用原始字符串(在引号前面加一个'r'),并用美元符号($)包围数学文本,如 TeX。 常规文本和数学文本可以在同一个字符串内交错。 Mathtext 可以使用 Computer Modern 字体(来自 (La)TeX),STIX 字体(为与 Times 混合使用而设计)或你提供的 Unicode 字体。 可以使用自定义变量mathtext.fontset选择 mathtext 字体(请参阅自定义 matplotlib

  • 注意在Python的 『narrow』 构建中,如果使用 STIX 字体,你还应该将ps.fonttypepdf.fonttype设置为 3(默认值),而不是 42。否则一些字符将不可见。

下面是个简单的例子:plt.title('alpha > beta'),生成alpha > beta;但是这个: plt.title(r'$\alpha > \beta$'),会生成 

\alpha > \beta


  • 注意:Mathtext 应该放在一对美元符号($)之间。 为了易于显示货币值,例如$ 100.00,如果整个字符串中存在单个美元符号,则它将被逐字显示为美元符号。 这是常规 TeX 的一个小改变,其中非数学文本中的美元符号必须被转义('$')。
  • 注意:虽然一对美元符号($)内的语法是 TeX 风格的,但是外面的文本不是。 特别是,字符:# $ % & ~ _ ^ \ { } \( \) \[ \]

在 TeX 中的数学模式之外有特殊的意义。 因此,根据rcParam text.usetex标志这些字符的表现有所不同。 更多信息请参阅usetex教程

下标和上标

为了制作下标和上标,使用_或者^符号: r'$\alpha_i > \beta_i$'

即为:

Python输入度数出sin值 python度数符号°怎么输入_ico_02

一些符号会自动将它们的下标或上标放在操作符的底部或顶部,例如,为了编写 0 到无穷的 

Python输入度数出sin值 python度数符号°怎么输入_ico_03

 的和,你可以:

     r'$\sum_{i=0}^\infty x_i$'

Python输入度数出sin值 python度数符号°怎么输入_ico_04

分数、二项式和堆叠数

可以使用\frac{}{}\binomial{}{}\stackrel{}{}命令分别创建分数,二项式和堆叠数字:r'$\frac{3}{4} \binom{3}{4} \stackrel{3}{4}$'

产生

Python输入度数出sin值 python度数符号°怎么输入_ci_05

分数可以任意嵌套:r'$\frac{5 - \frac{1}{x}}{4}$'

产生   

Python输入度数出sin值 python度数符号°怎么输入_ci_06

请注意,在分数周围放置圆括号和花括号需要特别注意。 这种明显的方式会产生太小的括号:


r'$(\frac{5 - \frac{1}{x}}{4})$'


  

Python输入度数出sin值 python度数符号°怎么输入_ci_07

解决方案是在括号前面加上\left\right以通知解析器这些括号包含整个对象:r'$\left(\frac{5 - \frac{1}{x}}{4}\right)$'

Python输入度数出sin值 python度数符号°怎么输入_TeX_08

根式

根式可以有\sqrt[]{}产生,例如:r'$\sqrt{2}$'

Python输入度数出sin值 python度数符号°怎么输入_ico_09

方括号内可以(可选地)设置任何底数。 请注意,底数必须是一个简单的表达式,并且不能包含布局命令,如分数或上下标:

r'$\sqrt[3]{x}$'

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_10

字体

用于数学符号的默认字体是斜体。

  • 注意:此默认值可以使用mathtext.default rcParam更改。 这是非常有用的,例如,通过将其设置为regular,使用与常规非数学文本相同的字体作为数学文本。

为了修改字体,例如,以罗马字体编写sin,使用字体命令来闭合文本:r'$s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)$'

Python输入度数出sin值 python度数符号°怎么输入_ci_11

这里st是斜体(默认)的变量,sin是罗马字体,振幅A是书法字体。 注意在上面的例子中,Asin之间的间距被挤压。 你可以使用间距命令在它们之间添加一些空格:s(t) = \mathcal{A}\/\sin(2 \omega t)

Python输入度数出sin值 python度数符号°怎么输入_TeX_12

所有字体的可用选项为:

命令

结果

\mathrm{Roman}

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_13

\mathit{Italic}

Python输入度数出sin值 python度数符号°怎么输入_ico_14

\mathtt{Typewriter}

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_15

\mathcal{CALLIGRAPHY}

Python输入度数出sin值 python度数符号°怎么输入_ci_16

使用 STIX 字体时,你也可以选择:

命令

结果

\mathbb{blackboard}

Python输入度数出sin值 python度数符号°怎么输入_ico_17

\mathrm{\mathbb{blackboard}}

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_18

\mathfrak{Fraktur}

Python输入度数出sin值 python度数符号°怎么输入_ci_19

\mathsf{sansserif}

Python输入度数出sin值 python度数符号°怎么输入_ci_20

\mathrm{\mathsf{sansserif}}

Python输入度数出sin值 python度数符号°怎么输入_TeX_21

\mathcircled{circled}

Python输入度数出sin值 python度数符号°怎么输入_TeX_22

还有三个全局『字体集』可供选择,它们使用matplotlibrc中的mathtext.fontset参数进行选择。

cm: Computer Modern (TeX)

Python输入度数出sin值 python度数符号°怎么输入_ico_23

stix: STIX (为和 Times 混合使用而设计)

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_24

stixsans: STIX sans-serif

Python输入度数出sin值 python度数符号°怎么输入_ci_25

此外,你可以使用\mathdefault{...}或其别名\mathregular{...}来使用用于 mathtext 之外的常规文本的字体。 这种方法有一些限制,最明显的是,可以使用很少的符号,但可用于将数学表达式与图中的其他文本混合。

自定义字体

mathtext 还提供了一种对数学公式使用自定义字体的方法。 这种方法使用起来相当棘手,应该看做为有耐心的用户准备的试验特性。 通过将rcParam mathtext.fontset设置为custom,你可以设置以下参数,这些参数控制用于特定数学字符集的字体文件。

参数

相当于

mathtext.it

\mathit{} 默认斜体

mathtext.rm

\mathrm{} 罗马字体(upright)

mathtext.tt

\mathtt{} 打字机(monospace)

mathtext.bf

\mathbf{} 粗体

mathtext.cal

\mathcal{} 书法

mathtext.sf

\mathsf{} sans-serif

每个参数应该设置为fontconfig字体描述符(在尚未编写的字体章节中定义)。

所使用的字体应该具有 Unicode 映射,以便找到任何非拉丁字符,例如希腊语。 如果要使用未包含在自定义字体中的数学符号,可以将rcParam mathtext.fallback_to_cm设置为True,这将导致自定义字体中找不到特定字符时,数学文本系统使用默认的 Computer Modern 字体中的字符。

请注意,Unicode 中规定的数学字形随时间而演进,许多字体的字形对于 mathtext 可能不在正确位置。

重音符号

重音命令可以位于任何符号之前,在其上添加重音。 他们中的一些些拥有较长和较短的形式。

命令

结果

\acute a 或 \'a

Python输入度数出sin值 python度数符号°怎么输入_ci_26

\bar a

Python输入度数出sin值 python度数符号°怎么输入_ci_27

\breve a

Python输入度数出sin值 python度数符号°怎么输入_ico_28

\ddot a 或 \"a

Python输入度数出sin值 python度数符号°怎么输入_ci_29

\dot a 或 \.a

Python输入度数出sin值 python度数符号°怎么输入_ci_30

\grave a 或 \a`

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_31

\hat a 或 \^a

Python输入度数出sin值 python度数符号°怎么输入_ico_32

\tilde a 或 \~a

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_33

\vec a

Python输入度数出sin值 python度数符号°怎么输入_ico_34

\overline{abc}

Python输入度数出sin值 python度数符号°怎么输入_ico_35

另外有两个特殊的重音符号,可以自动调整为符号的宽度:

命令

结果

\widehat{xyz}

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_36

\widetilde{xyz}

Python输入度数出sin值 python度数符号°怎么输入_ico_37

当把重音放在小写的ij上时应该小心。 注意下面的\imath用来避免i上额外的点:r"$\hat i\ \ \hat \imath$"

Python输入度数出sin值 python度数符号°怎么输入_ci_38

符号

你也可以使用更大量的 TeX 符号,比如\infty\leftarrow\sum\int

小写希腊字母

 

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_39

\alpha

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_40

\beta

Python输入度数出sin值 python度数符号°怎么输入_TeX_41

\chi

Python输入度数出sin值 python度数符号°怎么输入_ci_42

\epsilon

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_43

\eta

Python输入度数出sin值 python度数符号°怎么输入_ci_44

\gamma

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_45

\lambda

Python输入度数出sin值 python度数符号°怎么输入_TeX_46

\mu

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_47

\nu

Python输入度数出sin值 python度数符号°怎么输入_ci_48

\pi

Python输入度数出sin值 python度数符号°怎么输入_ico_49

\psi

Python输入度数出sin值 python度数符号°怎么输入_ico_50

\rho

Python输入度数出sin值 python度数符号°怎么输入_ico_51

\theta

Python输入度数出sin值 python度数符号°怎么输入_TeX_52

\upsilon

Python输入度数出sin值 python度数符号°怎么输入_ico_53

\varepsilon

Python输入度数出sin值 python度数符号°怎么输入_ico_54

\varpi

Python输入度数出sin值 python度数符号°怎么输入_ci_55

\varrho

Python输入度数出sin值 python度数符号°怎么输入_ci_56

\varsigma

Python输入度数出sin值 python度数符号°怎么输入_ico_57

\zeta

 

 

大写希腊字母

 

 

Python输入度数出sin值 python度数符号°怎么输入_ci_58

\Delta

Python输入度数出sin值 python度数符号°怎么输入_ico_59

\Gamma

Python输入度数出sin值 python度数符号°怎么输入_ico_60

\Lambda

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_61

\Psi

Python输入度数出sin值 python度数符号°怎么输入_ico_62

\Sigma

Python输入度数出sin值 python度数符号°怎么输入_ci_63

\Theta

Python输入度数出sin值 python度数符号°怎么输入_TeX_64

\nabla

 

 

希伯来文

 

 

Python输入度数出sin值 python度数符号°怎么输入_ico_65

\aleph

Python输入度数出sin值 python度数符号°怎么输入_ci_66

\beth

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_67

\daleth

分隔符

 

 

Python输入度数出sin值 python度数符号°怎么输入_ico_68

/

Python输入度数出sin值 python度数符号°怎么输入_ico_69

[

Python输入度数出sin值 python度数符号°怎么输入_ci_70

\Downarrow

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_71

\downarrow

Python输入度数出sin值 python度数符号°怎么输入_ci_72

\langle

Python输入度数出sin值 python度数符号°怎么输入_TeX_73

\lceil

Python输入度数出sin值 python度数符号°怎么输入_TeX_74

\rangle

Python输入度数出sin值 python度数符号°怎么输入_TeX_75

\rceil

Python输入度数出sin值 python度数符号°怎么输入_ico_76

\rfloor

Python输入度数出sin值 python度数符号°怎么输入_ci_77

\vert

Python输入度数出sin值 python度数符号°怎么输入_ci_78

\{

Python输入度数出sin值 python度数符号°怎么输入_ci_79

|

大型符号

 

 

Python输入度数出sin值 python度数符号°怎么输入_ci_80

\bigcap

Python输入度数出sin值 python度数符号°怎么输入_ico_81

\bigcup

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_82

\bigodot

Python输入度数出sin值 python度数符号°怎么输入_ico_83

\biguplus

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_84

\bigvee

Python输入度数出sin值 python度数符号°怎么输入_ico_85

\bigwedge

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_86

\oint

Python输入度数出sin值 python度数符号°怎么输入_ico_87

\prod

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_88

\sum

标准函数名称

 

 

Python输入度数出sin值 python度数符号°怎么输入_ico_89

\Pr

Python输入度数出sin值 python度数符号°怎么输入_ci_90

\arccos

Python输入度数出sin值 python度数符号°怎么输入_TeX_91

\arcsin

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_92

\arg

Python输入度数出sin值 python度数符号°怎么输入_TeX_93

\cos

Python输入度数出sin值 python度数符号°怎么输入_ico_94

\cosh

Python输入度数出sin值 python度数符号°怎么输入_TeX_95

\coth

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_96

\csc

Python输入度数出sin值 python度数符号°怎么输入_TeX_97

\deg

Python输入度数出sin值 python度数符号°怎么输入_ico_98

\dim

Python输入度数出sin值 python度数符号°怎么输入_ico_99

\exp

Python输入度数出sin值 python度数符号°怎么输入_ci_100

\gcd

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_101

\inf

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_102

\ker

Python输入度数出sin值 python度数符号°怎么输入_TeX_103

\lg

Python输入度数出sin值 python度数符号°怎么输入_ico_104

\liminf

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_105

\limsup

Python输入度数出sin值 python度数符号°怎么输入_ci_106

\ln

Python输入度数出sin值 python度数符号°怎么输入_TeX_107

\max

Python输入度数出sin值 python度数符号°怎么输入_TeX_108

\min

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_109

\sec

Python输入度数出sin值 python度数符号°怎么输入_TeX_110

\sinh

Python输入度数出sin值 python度数符号°怎么输入_ico_111

\sup

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_112

\tan

二元运算符和关系符号

 

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_113

\Bumpeq

Python输入度数出sin值 python度数符号°怎么输入_ico_114

\Cap

Python输入度数出sin值 python度数符号°怎么输入_ico_115

\Cup

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_116

\Doteq

Python输入度数出sin值 python度数符号°怎么输入_TeX_117

\Join

Python输入度数出sin值 python度数符号°怎么输入_TeX_118

\Subset

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_119

\Supset

Python输入度数出sin值 python度数符号°怎么输入_ico_120

\Vdash

Python输入度数出sin值 python度数符号°怎么输入_ico_121

\Vvdash

Python输入度数出sin值 python度数符号°怎么输入_ci_122

\approx

Python输入度数出sin值 python度数符号°怎么输入_ci_123

\approxeq

Python输入度数出sin值 python度数符号°怎么输入_ico_124

\ast

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_125

\asymp

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_126

\backepsilon

Python输入度数出sin值 python度数符号°怎么输入_TeX_127

\backsim

Python输入度数出sin值 python度数符号°怎么输入_TeX_128

\backsimeq

Python输入度数出sin值 python度数符号°怎么输入_ci_129

\barwedge

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_130

\because

Python输入度数出sin值 python度数符号°怎么输入_ci_131

\between

Python输入度数出sin值 python度数符号°怎么输入_ico_132

\bigcirc

Python输入度数出sin值 python度数符号°怎么输入_ico_133

\bigtriangledown

Python输入度数出sin值 python度数符号°怎么输入_ico_134

\bigtriangleup

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_135

\blacktriangleleft

Python输入度数出sin值 python度数符号°怎么输入_ci_136

\blacktriangleright

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_137

\bot

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_138

\bowtie

Python输入度数出sin值 python度数符号°怎么输入_ci_139

\boxdot

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_140

\boxminus

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_141

\boxplus

Python输入度数出sin值 python度数符号°怎么输入_ico_142

\boxtimes

Python输入度数出sin值 python度数符号°怎么输入_TeX_143

\bullet

Python输入度数出sin值 python度数符号°怎么输入_ci_144

\bumpeq

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_145

\cap

Python输入度数出sin值 python度数符号°怎么输入_ico_146

\cdot

Python输入度数出sin值 python度数符号°怎么输入_ci_147

\circ

Python输入度数出sin值 python度数符号°怎么输入_ci_148

\circeq

Python输入度数出sin值 python度数符号°怎么输入_TeX_149

\coloneq

Python输入度数出sin值 python度数符号°怎么输入_ci_150

\cong

Python输入度数出sin值 python度数符号°怎么输入_TeX_151

\cup

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_152

\curlyeqprec

Python输入度数出sin值 python度数符号°怎么输入_TeX_153

\curlyeqsucc

Python输入度数出sin值 python度数符号°怎么输入_ci_154

\curlyvee

Python输入度数出sin值 python度数符号°怎么输入_TeX_155

\curlywedge

Python输入度数出sin值 python度数符号°怎么输入_TeX_156

\dag

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_157

\dashv

Python输入度数出sin值 python度数符号°怎么输入_TeX_158

\ddag

Python输入度数出sin值 python度数符号°怎么输入_TeX_159

\diamond

Python输入度数出sin值 python度数符号°怎么输入_ico_160

\div

Python输入度数出sin值 python度数符号°怎么输入_TeX_161

\divideontimes

Python输入度数出sin值 python度数符号°怎么输入_ci_162

\doteq

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_163

\doteqdot

Python输入度数出sin值 python度数符号°怎么输入_ci_164

\dotplus

Python输入度数出sin值 python度数符号°怎么输入_TeX_165

\doublebarwedge

Python输入度数出sin值 python度数符号°怎么输入_ico_166

\eqcirc

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_167

\eqcolon

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_168

\eqsim

Python输入度数出sin值 python度数符号°怎么输入_ci_169

\eqslantgtr

Python输入度数出sin值 python度数符号°怎么输入_ico_170

\eqslantless

Python输入度数出sin值 python度数符号°怎么输入_TeX_171

\equiv

Python输入度数出sin值 python度数符号°怎么输入_ico_172

\fallingdotseq

Python输入度数出sin值 python度数符号°怎么输入_ico_173

\frown

Python输入度数出sin值 python度数符号°怎么输入_ci_174

\geq

Python输入度数出sin值 python度数符号°怎么输入_TeX_175

\geqq

Python输入度数出sin值 python度数符号°怎么输入_ci_176

\geqslant

Python输入度数出sin值 python度数符号°怎么输入_ci_177

\gg

Python输入度数出sin值 python度数符号°怎么输入_TeX_178

\ggg

Python输入度数出sin值 python度数符号°怎么输入_ico_179

\gnapprox

Python输入度数出sin值 python度数符号°怎么输入_ci_180

\gneqq

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_181

\gnsim

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_182

\gtrapprox

Python输入度数出sin值 python度数符号°怎么输入_ci_183

\gtrdot

Python输入度数出sin值 python度数符号°怎么输入_TeX_184

\gtreqless

Python输入度数出sin值 python度数符号°怎么输入_ci_185

\gtreqqless

Python输入度数出sin值 python度数符号°怎么输入_ico_186

\gtrless

Python输入度数出sin值 python度数符号°怎么输入_TeX_187

\gtrsim

Python输入度数出sin值 python度数符号°怎么输入_ico_188

\in

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_189

\intercal

Python输入度数出sin值 python度数符号°怎么输入_ico_190

\leftthreetimes

Python输入度数出sin值 python度数符号°怎么输入_TeX_191

\leq

Python输入度数出sin值 python度数符号°怎么输入_ci_192

\leqq

Python输入度数出sin值 python度数符号°怎么输入_TeX_193

\leqslant

Python输入度数出sin值 python度数符号°怎么输入_ci_194

\lessapprox

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_195

\lessdot

Python输入度数出sin值 python度数符号°怎么输入_ci_196

\lesseqgtr

Python输入度数出sin值 python度数符号°怎么输入_TeX_197

\lesseqqgtr

Python输入度数出sin值 python度数符号°怎么输入_TeX_198

\lessgtr

Python输入度数出sin值 python度数符号°怎么输入_ci_199

\lesssim

Python输入度数出sin值 python度数符号°怎么输入_ci_200

\ll

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_201

\lll

Python输入度数出sin值 python度数符号°怎么输入_ico_202

\lnapprox

Python输入度数出sin值 python度数符号°怎么输入_TeX_203

\lneqq

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_204

\lnsim

Python输入度数出sin值 python度数符号°怎么输入_ico_205

\ltimes

Python输入度数出sin值 python度数符号°怎么输入_ico_206

\mid

Python输入度数出sin值 python度数符号°怎么输入_ico_207

\models

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_208

\mp

Python输入度数出sin值 python度数符号°怎么输入_ico_209

\nVDash

Python输入度数出sin值 python度数符号°怎么输入_TeX_210

\nVdash

Python输入度数出sin值 python度数符号°怎么输入_TeX_211

\napprox

Python输入度数出sin值 python度数符号°怎么输入_ico_212

\ncong

Python输入度数出sin值 python度数符号°怎么输入_TeX_213

\ne

Python输入度数出sin值 python度数符号°怎么输入_TeX_214

\neq

Python输入度数出sin值 python度数符号°怎么输入_TeX_214

\neq

Python输入度数出sin值 python度数符号°怎么输入_ci_216

\nequiv

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_217

\ngeq

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_218

\ngtr

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_219

\ni

Python输入度数出sin值 python度数符号°怎么输入_ci_220

\nleq

Python输入度数出sin值 python度数符号°怎么输入_ico_221

\nless

Python输入度数出sin值 python度数符号°怎么输入_ico_222

\nmid

Python输入度数出sin值 python度数符号°怎么输入_ico_223

\notin

Python输入度数出sin值 python度数符号°怎么输入_ico_224

\nparallel

Python输入度数出sin值 python度数符号°怎么输入_ico_225

\nprec

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_226

\nsim

Python输入度数出sin值 python度数符号°怎么输入_ci_227

\nsubset

Python输入度数出sin值 python度数符号°怎么输入_ico_228

\nsubseteq

Python输入度数出sin值 python度数符号°怎么输入_TeX_229

\nsucc

Python输入度数出sin值 python度数符号°怎么输入_ci_230

\nsupset

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_231

\nsupseteq

Python输入度数出sin值 python度数符号°怎么输入_TeX_232

\ntriangleleft

Python输入度数出sin值 python度数符号°怎么输入_TeX_233

\ntrianglelefteq

Python输入度数出sin值 python度数符号°怎么输入_ico_234

\ntriangleright

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_235

\ntrianglerighteq

Python输入度数出sin值 python度数符号°怎么输入_ci_236

\nvDash

Python输入度数出sin值 python度数符号°怎么输入_ci_237

\nvdash

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_238

\odot

Python输入度数出sin值 python度数符号°怎么输入_ci_239

\ominus

Python输入度数出sin值 python度数符号°怎么输入_ico_240

\oplus

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_241

\oslash

Python输入度数出sin值 python度数符号°怎么输入_ico_242

\otimes

Python输入度数出sin值 python度数符号°怎么输入_TeX_243

\parallel

Python输入度数出sin值 python度数符号°怎么输入_ico_244

\perp

Python输入度数出sin值 python度数符号°怎么输入_ci_245

\pitchfork

Python输入度数出sin值 python度数符号°怎么输入_ci_246

\pm

Python输入度数出sin值 python度数符号°怎么输入_TeX_247

\prec

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_248

\precapprox

Python输入度数出sin值 python度数符号°怎么输入_ci_249

\preccurlyeq

Python输入度数出sin值 python度数符号°怎么输入_TeX_250

\preceq

Python输入度数出sin值 python度数符号°怎么输入_ci_251

\precnapprox

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_252

\precnsim

Python输入度数出sin值 python度数符号°怎么输入_ico_253

\precsim

Python输入度数出sin值 python度数符号°怎么输入_ci_254

\propto

Python输入度数出sin值 python度数符号°怎么输入_TeX_255

\rightthreetimes

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_256

\risingdotseq

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_257

\rtimes

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_258

\sim

Python输入度数出sin值 python度数符号°怎么输入_ci_259

\simeq

Python输入度数出sin值 python度数符号°怎么输入_ico_260

\slash

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_261

\smile

Python输入度数出sin值 python度数符号°怎么输入_TeX_262

\sqcap

Python输入度数出sin值 python度数符号°怎么输入_TeX_263

\sqcup

Python输入度数出sin值 python度数符号°怎么输入_TeX_264

\sqsubset

Python输入度数出sin值 python度数符号°怎么输入_TeX_264

\sqsubset

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_266

\sqsubseteq

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_267

\sqsupset

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_267

\sqsupset

Python输入度数出sin值 python度数符号°怎么输入_ci_269

\sqsupseteq

Python输入度数出sin值 python度数符号°怎么输入_TeX_270

\star

Python输入度数出sin值 python度数符号°怎么输入_ico_271

\subset

Python输入度数出sin值 python度数符号°怎么输入_TeX_272

\subseteq

Python输入度数出sin值 python度数符号°怎么输入_ico_273

\subseteqq

Python输入度数出sin值 python度数符号°怎么输入_ico_274

\subsetneq

Python输入度数出sin值 python度数符号°怎么输入_TeX_275

\subsetneqq

Python输入度数出sin值 python度数符号°怎么输入_TeX_276

\succ

Python输入度数出sin值 python度数符号°怎么输入_ico_277

\succapprox

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_278

\succcurlyeq

Python输入度数出sin值 python度数符号°怎么输入_ci_279

\succeq

Python输入度数出sin值 python度数符号°怎么输入_ico_280

\succnapprox

Python输入度数出sin值 python度数符号°怎么输入_TeX_281

\succnsim

Python输入度数出sin值 python度数符号°怎么输入_ico_282

\succsim

Python输入度数出sin值 python度数符号°怎么输入_ci_283

\supset

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_284

\supseteq

Python输入度数出sin值 python度数符号°怎么输入_ico_285

\supseteqq

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_286

\supsetneq

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_287

\supsetneqq

Python输入度数出sin值 python度数符号°怎么输入_ci_288

\therefore

Python输入度数出sin值 python度数符号°怎么输入_ico_289

\times

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_290

\top

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_291

\triangleleft

Python输入度数出sin值 python度数符号°怎么输入_ci_292

\trianglelefteq

Python输入度数出sin值 python度数符号°怎么输入_ico_293

\triangleq

Python输入度数出sin值 python度数符号°怎么输入_ci_294

\triangleright

Python输入度数出sin值 python度数符号°怎么输入_ci_295

\trianglerighteq

Python输入度数出sin值 python度数符号°怎么输入_ico_296

\uplus

Python输入度数出sin值 python度数符号°怎么输入_TeX_297

\vDash

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_298

\varpropto

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_299

\vartriangleleft

Python输入度数出sin值 python度数符号°怎么输入_ci_300

\vartriangleright

Python输入度数出sin值 python度数符号°怎么输入_ico_301

\vdash

Python输入度数出sin值 python度数符号°怎么输入_ci_302

\vee

Python输入度数出sin值 python度数符号°怎么输入_TeX_303

\veebar

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_304

\wedge

Python输入度数出sin值 python度数符号°怎么输入_TeX_305

\wr

 

 

箭头符号

所有向上箭头前面都要有两个\

 

Python输入度数出sin值 python度数符号°怎么输入_ico_306

\Downarrow

Python输入度数出sin值 python度数符号°怎么输入_TeX_307

\Leftarrow

 

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_308

\Leftrightarrow

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_309

\Lleftarrow

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_310

\Longleftarrow

Python输入度数出sin值 python度数符号°怎么输入_ico_311

\Longleftrightarrow

 

Python输入度数出sin值 python度数符号°怎么输入_ci_312

\Longrightarrow

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_313

\Lsh

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_314

\Nearrow

Python输入度数出sin值 python度数符号°怎么输入_TeX_315

\Nwarrow

 

Python输入度数出sin值 python度数符号°怎么输入_ico_316

\Rightarrow

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_317

\Rrightarrow

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_318

\Rsh

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_319

\Searrow

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_320

\Swarrow

Python输入度数出sin值 python度数符号°怎么输入_ico_321

\Uparrow

 

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_322

\Updownarrow

Python输入度数出sin值 python度数符号°怎么输入_TeX_323

\circlearrowleft

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_324

\circlearrowright

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_325

\curvearrowleft

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_326

\curvearrowright

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_327

\dashleftarrow

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_328

\dashrightarrow

Python输入度数出sin值 python度数符号°怎么输入_TeX_329

\downarrow

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_330

\downdownarrows

Python输入度数出sin值 python度数符号°怎么输入_TeX_331

\downharpoonleft

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_332

\downharpoonright

Python输入度数出sin值 python度数符号°怎么输入_TeX_333

\hookleftarrow

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_334

\hookrightarrow

Python输入度数出sin值 python度数符号°怎么输入_ico_335

\leadsto

 

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_336

\leftarrow

Python输入度数出sin值 python度数符号°怎么输入_ci_337

\leftarrowtail

 

Python输入度数出sin值 python度数符号°怎么输入_ci_338

\leftharpoondown

Python输入度数出sin值 python度数符号°怎么输入_ci_339

\leftharpoonup

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_340

\leftleftarrows

Python输入度数出sin值 python度数符号°怎么输入_ci_341

\leftrightarrow

 

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_342

\leftrightarrows

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_343

\leftrightharpoons

 

Python输入度数出sin值 python度数符号°怎么输入_ci_344

\leftrightsquigarrow

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_345

\leftsquigarrow

 

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_346

\longleftarrow

Python输入度数出sin值 python度数符号°怎么输入_ico_347

\longleftrightarrow

 

Python输入度数出sin值 python度数符号°怎么输入_ci_348

\longmapsto

Python输入度数出sin值 python度数符号°怎么输入_TeX_349

\longrightarrow

 

Python输入度数出sin值 python度数符号°怎么输入_ci_350

\looparrowleft

Python输入度数出sin值 python度数符号°怎么输入_ico_351

\looparrowright

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_352

\mapsto

Python输入度数出sin值 python度数符号°怎么输入_TeX_353

\multimap

 

Python输入度数出sin值 python度数符号°怎么输入_ci_354

\nLeftarrow

Python输入度数出sin值 python度数符号°怎么输入_ci_355

\nLeftrightarrow

 

Python输入度数出sin值 python度数符号°怎么输入_ico_356

\nRightarrow

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_357

\nearrow

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_358

\nleftarrow

Python输入度数出sin值 python度数符号°怎么输入_TeX_359

\nleftrightarrow

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_360

\nrightarrow

Python输入度数出sin值 python度数符号°怎么输入_TeX_361

\nwarrow

 

Python输入度数出sin值 python度数符号°怎么输入_TeX_362

\rightarrow

Python输入度数出sin值 python度数符号°怎么输入_TeX_363

\rightarrowtail

 

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_364

\rightharpoondown

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_365

\rightharpoonup

 

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_366

\rightleftarrows

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_366

\rightleftarrows

 

Python输入度数出sin值 python度数符号°怎么输入_ci_368

\rightleftharpoons

Python输入度数出sin值 python度数符号°怎么输入_ci_368

\rightleftharpoons

 

Python输入度数出sin值 python度数符号°怎么输入_ci_370

\rightrightarrows

Python输入度数出sin值 python度数符号°怎么输入_ci_370

\rightrightarrows

 

Python输入度数出sin值 python度数符号°怎么输入_ci_372

\rightsquigarrow

Python输入度数出sin值 python度数符号°怎么输入_ci_373

\searrow

 

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_374

\swarrow

Python输入度数出sin值 python度数符号°怎么输入_TeX_375

\to

 

Python输入度数出sin值 python度数符号°怎么输入_ico_376

\twoheadleftarrow

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_377

\twoheadrightarrow

 

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_378

\uparrow

Python输入度数出sin值 python度数符号°怎么输入_ci_379

\updownarrow

 

Python输入度数出sin值 python度数符号°怎么输入_ci_379

\updownarrow

Python输入度数出sin值 python度数符号°怎么输入_TeX_381

\upharpoonleft

 

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_382

\upharpoonright

Python输入度数出sin值 python度数符号°怎么输入_ci_383

\upuparrows

 

杂项符号

 

 

Python输入度数出sin值 python度数符号°怎么输入_ci_384

\$

Python输入度数出sin值 python度数符号°怎么输入_TeX_385

\AA

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_386

\Finv

Python输入度数出sin值 python度数符号°怎么输入_ci_387

\Game

Python输入度数出sin值 python度数符号°怎么输入_TeX_388

\Im

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_389

\P

Python输入度数出sin值 python度数符号°怎么输入_ci_390

\Re

Python输入度数出sin值 python度数符号°怎么输入_ico_391

\S

Python输入度数出sin值 python度数符号°怎么输入_ci_392

\angle

Python输入度数出sin值 python度数符号°怎么输入_TeX_393

\backprime

Python输入度数出sin值 python度数符号°怎么输入_ci_394

\bigstar

Python输入度数出sin值 python度数符号°怎么输入_ci_395

\blacksquare

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_396

\blacktriangle

Python输入度数出sin值 python度数符号°怎么输入_ico_397

\blacktriangledown

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_398

\cdots

Python输入度数出sin值 python度数符号°怎么输入_ci_399

\checkmark

Python输入度数出sin值 python度数符号°怎么输入_ci_400

\circledR

Python输入度数出sin值 python度数符号°怎么输入_ci_401

\circledS

Python输入度数出sin值 python度数符号°怎么输入_TeX_402

\clubsuit

Python输入度数出sin值 python度数符号°怎么输入_ci_403

\complement

Python输入度数出sin值 python度数符号°怎么输入_ci_404

\copyright

Python输入度数出sin值 python度数符号°怎么输入_TeX_405

\ddots

Python输入度数出sin值 python度数符号°怎么输入_TeX_406

\diamondsuit

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_407

\ell

Python输入度数出sin值 python度数符号°怎么输入_ico_408

\emptyset

Python输入度数出sin值 python度数符号°怎么输入_ico_409

\eth

Python输入度数出sin值 python度数符号°怎么输入_ico_410

\exists

Python输入度数出sin值 python度数符号°怎么输入_ico_411

\flat

Python输入度数出sin值 python度数符号°怎么输入_ci_412

\forall

Python输入度数出sin值 python度数符号°怎么输入_TeX_413

\hbar

Python输入度数出sin值 python度数符号°怎么输入_ci_414

\heartsuit

Python输入度数出sin值 python度数符号°怎么输入_ci_415

\hslash

Python输入度数出sin值 python度数符号°怎么输入_ico_416

\iiint

Python输入度数出sin值 python度数符号°怎么输入_TeX_417

\iint

Python输入度数出sin值 python度数符号°怎么输入_TeX_417

\iint

Python输入度数出sin值 python度数符号°怎么输入_ico_419

\imath

Python输入度数出sin值 python度数符号°怎么输入_TeX_420

\infty

Python输入度数出sin值 python度数符号°怎么输入_ci_421

\jmath

Python输入度数出sin值 python度数符号°怎么输入_ico_422

\ldots

Python输入度数出sin值 python度数符号°怎么输入_ci_423

\measuredangle

Python输入度数出sin值 python度数符号°怎么输入_TeX_424

\natural

Python输入度数出sin值 python度数符号°怎么输入_TeX_425

\neg

Python输入度数出sin值 python度数符号°怎么输入_TeX_426

\nexists

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_427

\oiiint

Python输入度数出sin值 python度数符号°怎么输入_ci_428

\partial

Python输入度数出sin值 python度数符号°怎么输入_TeX_429

\prime

Python输入度数出sin值 python度数符号°怎么输入_ci_430

\sharp

Python输入度数出sin值 python度数符号°怎么输入_ico_431

\spadesuit

Python输入度数出sin值 python度数符号°怎么输入_ci_432

\sphericalangle

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_433

\ss

Python输入度数出sin值 python度数符号°怎么输入_Python输入度数出sin值_434

\triangledown

Python输入度数出sin值 python度数符号°怎么输入_ci_435

\varnothing

Python输入度数出sin值 python度数符号°怎么输入_ci_436

\vartriangle

Python输入度数出sin值 python度数符号°怎么输入_ci_437

\vdots

Python输入度数出sin值 python度数符号°怎么输入_TeX_438

\wp

Python输入度数出sin值 python度数符号°怎么输入_ico_439

\yen

 

如果特定符号没有名称(对于 STIX 字体中的许多较为模糊的符号也是如此),也可以使用 Unicode 字符:ur'$\u23ce$'

示例

下面是个示例,在上下文中展示了许多这些特性。

import numpy as np

import matplotlib.pyplot as plt

t = np.arange(0.0, 2.0, 0.01)

s = np.sin(2*np.pi*t)

plt.plot(t,s)

plt.title(r'$\alpha_i > \beta_i$', fontsize=20)

plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$', fontsize=20)

plt.text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$',fontsize=20)

plt.xlabel('time (s)')

plt.ylabel('volts (mV)')

plt.show()