matplotlib如何写出汉字
来源:互联网 发布:电影特效软件 编辑:程序博客网 时间:2024/06/05 07:02
from matplotlib.font_manager import FontProperties import numpy as npimport matplotlib.pyplot as plt font = FontProperties(fname="/usr/share/fonts/truetype/droid/DroidSansFallbackFull.ttf", size=14) plt.figure(figsize=(5,5))x=np.arange(0,5,0.1)y=np.sin(x)plt.plot(x,y,color='r',label='sin')plt.legend(loc=1)plt.xlabel(u"横坐标", fontproperties=font) plt.ylabel(u"纵坐标", fontproperties=font) plt.title(u"正弦函数",fontproperties=font) plt.text(0.5,0.5,u'正弦函数',fontproperties=font)
阅读全文
0 0
- matplotlib如何写出汉字
- Matplotlib绘图汉字不能正常显示问题
- Python matplotlib绘图时汉字显示不正常
- Matplotlib 如何显示中文
- 如何添加numpy,matplotlib
- 如何安装matplotlib模块
- 如何安装matplotlib模块
- 如何写出原创文章
- 如何写出好代码
- 如何写出好文章?
- 如何写出好代码
- 如何写出高效sql
- 如何写出好函数
- Matplotlib 如何画散点图的图例
- 如何写出优秀的程序?
- 如何写出好的软件
- 如何写出优秀的程序?
- 如何写出优秀的程序?
- 倍增lca学习笔记(codevs2370小机房的树题解)
- Android开发第一步,软件准备和环境搭建
- 牛顿法与拟牛顿法学习笔记(三)DFP 算法
- Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after
- 【数据结构】图的介绍
- matplotlib如何写出汉字
- 小白学爬虫----3--简单爬取“生活大爆炸”贴吧
- TCP/IP详解学习笔记(5)-IP选路,动态选路,和一些细节
- 前端性能优化----几种常用的方法。
- Qt调试 error:expected.........
- HDU
- EasyUI datagrid SpringMVC JPA 翻页功能实现
- oraecl导入导出数据
- linux(kali)开启ssh端口服务