文档中介绍的很详细:https://matplotlib.org/tutorials/text/mathtext.html

matplotlib  Tutoials --> Text --> Writing mathematical expressionsr

 plt.title(r'\$100')  # 就是要显示$符号时,使用转义字符

 plt.title(r'$\alpha_i > \beta_i$')  # 下标: '_'
plt.title(r'$\sum_{i=0}^\infty x_i$') # 下标: '_',上标: '^', 无穷: \infty plt.title(r'$\frac{3}{4} \binom{3}{4} \stackrel{3}{4}$') # 分数,二项式,堆叠数据
plt.title(r'$\frac{5 - \frac{1}{x}}{4}$') # 嵌套
plt.title(r'$(\frac{5 - \frac{1}{x}}{4})$') # 括号,too small
plt.title(r'$\left(\frac{5 - \frac{1}{x}}{4}\right)$') # 括号,`\left(`, `\right)` plt.title(r'$\sqrt{2}$') # 数根,2的开方
plt.title(r'$\sqrt[3]{x}$') # 数根,x开3次方 plt.title(r'$s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)$') # 字体 mathcal: 书写的, mathrm: Roman
plt.title(r'$s(t) = \mathcal{A}\sin(2 \omega t)$') # 常用函数的快捷用法
plt.title(r'$s(t) = \mathcal{A}\/\sin(2 \omega t)$') # 空格
plt.title(r'$\mathfrak{Fraktur}$') plt.title(r'$\bar a$') # 音调
plt.show()

随机推荐

  1. python3用BeautifulSoup用re.compile来匹配需要抓取的href地址

    # -*- coding:utf-8 -*- #python 2.7 #XiaoDeng #http://tieba.baidu.com/p/2460150866 #标签操作 from bs4 imp ...

  2. Linux中搭建一个ftp服务器详解

    来源:Linux社区  作者:luzhi1024 详解Linux中搭建一个ftp服务器. ftp工作是会启动两个通道:控制通道 , 数据通道在ftp协议中,控制连接均是由客户端发起的,而数据连接有两种 ...

  3. Spark 论文篇-Spark:工作组上的集群计算的框架(中英双语)

    论文内容: 待整理 参考文献: Spark: Cluster Computing with Working Sets. Matei Zaharia, Mosharaf Chowdhury, Micha ...

  4. AJAX技术之DWR框架

    DWR(Direct Web Remoting)是一个用于改善web页面与Java类交互的远程服务器端Ajax开源框架,可以帮助开发人员开发包含AJAX技术的网站.它可以允许在浏览器里的代码使用运行在 ...

  5. JPA+Hibernate 3.3 ——基本属性映射

      1.数据库中字段的数据类型为longtext  存放二进制文本的注解方式 private byte[] file; //设置延迟初始化 @Lob @Basic(fetch=FetchType.LA ...

  6. 菜鸟教程之工具使用(九)——Git如何进行分支的merge操作

    今天继续我们的Git教程,Git杀手锏级的功能就是对于分支的管理,那么今天就来说说分支之间的merge操作.merge可以说是我们日常使用最多的操作之一,通常一个merge操作会包含commit.pu ...

  7. 动软 生成 linq相关DAO

    第一步:新建自定义模板 <#@ template language="c#" HostSpecific="True" #> <#@ outpu ...

  8. Zookeeper之Zookeeper的Client的分析【转】

    Zookeeper之Zookeeper的Client的分析 1)几个重要概念 ZooKeeper:客户端入口 Watcher:客户端注册的callback ZooKeeper.SendThread:  ...

  9. Zookeeper之Zookeeper底层客户端架构实现原理(转载)

    Zookeeper的Client直接与用户打交道,是我们使用Zookeeper的interface.了解ZK Client的结构和工作原理有利于我们合理的使用ZK,并能在使用中更早的发现问题.本文将在 ...

  10. C#获取文件版本信息

    使用FileVersionInfo获取版本信息 FileVersionInfo info = FileVersionInfo.GetVersionInfo(Application.Current.St ...