当前位置:网站首页>Matplotlib Chinese question
Matplotlib Chinese question
2022-07-29 01:34:00 【Red eye Aromatherapy】
yes matplotlib There are no Chinese fonts in the library .
that , Let's just install it .
1、 adopt pip install 【anaconda】
pip3 install anaconda
2、 Add settings
from matplotlib import pyplot as plt
plt.rcParams['font.sans-serif'] = ['SimHei'] # Used to display Chinese labels normally
plt.rcParams['axes.unicode_minus'] = False # Used to display negative sign normally Demo Example :
from matplotlib import pyplot as plt
import random
plt.rcParams['font.sans-serif'] = ['SimHei'] # Used to display Chinese labels normally
plt.rcParams['axes.unicode_minus'] = False # Used to display negative sign normally
# Abnormal temperature change value
# 0. Get ready x, y Coordinate data
x = range(100)
y_jiangsu = [random.randint(-50, 60) for i in x]
# 1. Create a canvas
plt.figure(figsize=(20, 8), dpi=80)
# 2. Draw line chart
plt.plot(x, y_jiangsu)
plt.title(" Abnormal temperature change table ")
plt.xlabel(" temperature ℃")
plt.ylabel(" Record times ")
# 3. Display images
plt.show()

边栏推荐
- SDRAM Controller Design (two design methods of digital controller)
- 一文搞懂ES6基本全部语法
- Flink SQL Hudi 实战
- 【ManageEngine】助力哈尔滨工程大学实现网络流量一体化监控管理
- Docker-compose安装mysql
- Intel introduces you to visual recognition -- openvino
- Read the recent trends of okaleido tiger and tap the value and potential behind it
- Comprehensive upgrade, all you can imagine is here -- JD API interface
- 瑞吉外卖项目实战Day01
- Flink Postgres CDC
猜你喜欢

CSDN modify column name

Openpyxl border

matplotlib中文问题

Redis installation, cluster deployment and common tuning

18 diagrams, intuitive understanding of neural networks, manifolds and topologies

Canal real-time parsing MySQL binlog data practice

什么是原码、反码和补码

北京护照西班牙语翻译推荐

Openpyxl library fill color

Openpyxl cell center
随机推荐
Google play APK uploads other international app stores
J9数字论:什么因素决定NFT的价值?
第二轮Okaleido Tiger热卖的背后,是背后生态机构战略支持
时间复杂度、空间复杂度的学习总结
Bracket matching test
SDRAM Controller Design (two design methods of digital controller)
T-sne降维
SQL question brushing: find the last of all employees_ Name and first_ Name and corresponding department number Dept_ no
Linux redis source code installation
Flask project architecture (First Edition
Teach you a text to solve the problem of JS digital accuracy loss
ValueError: Colors must be aRGB hex values
After understanding the composition of the URL of the website, we use the URL module, querystring module and mime module to improve the static website
SQL question brushing: find the employee number EMP with more than 15 salary records_ No and its corresponding recording times t
SQL question brushing: find the current salary details and department number Dept_ no
Code generator
Third party login process of flask Weibo
Redis installation, cluster deployment and common tuning
PLATO上线LAAS协议Elephant Swap,用户可借此获得溢价收益
Django reports an error using pymsql module django.db.utils.operationalerror