matplotlib图例中文显示问题
来源:互联网 发布:centos shutdown命令 编辑:程序博客网 时间:2024/05/18 01:39
import numpy as np
import pandas as pd
from pandas import DataFrame,Series
import matplotlib
import matplotlib.pyplot as plt
import pylab as pl
#simkai.ttf 是电脑控制面板里字体的一种,这里是楷体
chinese =matplotlib.font_manager.FontProperties(fname='C:\Windows\Fonts\simkai.ttf')
x1 = [1, 2, 3, 4, 5]
y1 = [1, 4, 9, 16, 25]
x2 = [1, 2, 4, 6, 8]
y2 = [2, 4, 8, 12, 16]
plot1 = pl.plot(x1, y1, 'r',label=u'红')
plot2 = pl.plot(x2, y2, 'go',label=u'绿')
plt.legend(prop=chinese)
Out[31]: <matplotlib.legend.Legend at 0xe1ad390>


阅读全文
0 0
- matplotlib图例中文显示问题
- matplotlib 图例显示中文
- Matplotlib 图例中文显示(大小修改)
- python matplotlib绘图时图例显示问题
- matplotlib图例中文乱码
- 【Matplotlib】图例分开显示
- matplotlib显示中文问题
- matplotlib显示中文问题
- matplotlib中文显示问题
- Python学习笔记(8)--matplotlib图例显示中文
- windows下matplotlib图例中文无法显示的解决办法
- Matplotlib中文显示的问题
- Matplotlib中文显示的问题
- python matplotlib中文显示问题
- python matplotlib中文显示问题
- python matplotlib中文显示问题
- Matplotlib输出中文显示问题
- Matplotlib中文显示的问题
- 优化tableview注意点
- ICP算法
- Leetcode Reverse Linked List II
- 解决win7 64位操作系统下安装PL/SQL后连接报错问题: make sure you have the 32 bits oracle client installed
- OpenCV 获取ROI
- matplotlib图例中文显示问题
- ceph0.94安装
- keras切换后端(backend)为tensorflow或theano的方法
- Windows下使用Visual Studio Code搭建Go语言环境
- ssh登陆之忽略known_hosts文件
- 关于免费的seo网站推广方法有哪些?
- oracle 执行 被卡死处理
- 计算机视觉开发必备工具
- easyui 项目ui.js公共方法