-
x=[22,22,23,24,25,25,26,27,28,29,30,30,32,32,32,33,34,34,35,36,37,38,38,39,40,42,43,43,45,45,46,48,48,48,50,52,56,57,60,62]
y=[176,186,164,177,183,194,180,179,190,170,168,192,173,178,181,186,177,187,180,195,179,186,187,190,182,184,176,178,164,185,181,175,173,172,172,169,168,182,188,174]
z=[70, 220, 50, 170, 210, 270, 150, 150, 360, 150, 150, 200, 150, 170, 170, 160, 180, 460, 480, 480, 490, 300, 300, 250, 300, 250, 350, 180, 100, 250, 160, 170, 160, 180, 150, 150, 130, 180, 100, 160]QAQ
查看全部 -
name_list = ['语文','数学','英语']
c1 = [81.4,83,87.1]
c2 = [85.6,87.4,90]
c3 = [78,81.2,86.1]
查看全部 -
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
plt.rcParams['font.sans-serif']=['SimHei']
ch=[72,80,66,77,92]
math=[62,92,72,75,88]
eng=[76,81,73,75,80]
plt.bar(绘制的轴,数据,数据起始绘制位置是bottom=,颜色color=,数据标签label=)
plt.ylim(0,300) #y的范围是0-300
plt.legend(loc='upper right') #在右上添加标签
plt.grid(axis='y', color='gray', linestyle=':', linewidth=2) #添加背景的虚线查看全部 -
r = [1,2,3,4,5] #极径
theta=[0.0,1.5707963267948966,3.141592653589793,4.71238898038469,6.283185307179586] #角度
year=range(2005,2020)
height=[157,160,162,163,167,170,176,175,174,179,182,182,182,182.182,183]
查看全部 -
data = [[18.9,10.4],[21.3,8.7],[19.5,11.6],[20.5,9.7],[19.9,9.4],[22.3,11],[21.4,10.6],[9,9.4],[10.4,9],[9.3,11.3],[11.6,8.5],[11.8,10.4],[10.3,10],[8.7,9.5],[14.3,17.2],[14.1,15.5],[14,16.5],[16.5,17.7],[15.1,17.3],[16.4,15],[15.7,18]]
data=[77,70,72,89,89,70,90,87,94,63,81,99,94,80,95,67,65,88,60,67,85,88,87,75,62,65,95,62,61,93,30]
查看全部 -
# 中文支持
plt.rcParams['font.sans-serif'] = ['SimHei']
# 正常显示负号
plt.rcParams['axes.unicode_minus'] = False
# 修改线条样式
plt.rcParams['lines.linewidth']=5 #线条宽
plt.rcParams['lines.color']='red' #线条颜色
plt.rcParams['lines.linestyle']='--' #线条样式线条样式的有效值有:
'-', '--', '-.', ':', 'solid', 'dashed', 'dashdot', 'dotted', 'none', ' ', ''
中文字体显示设置的另一个参考:
https://www.runoob.com/numpy/numpy-matplotlib.html
查看全部 -
height=[168,155,182,170,173,161,155,173,176,181,166,172,170]
查看全部 -
import Matplotlip成功运行查看全部
-
%matplotlib inline查看全部
-
conda create -n myPython python=3.7
conda activate myPython
conda install jupyter
jupyter notebook
查看全部 -
我的笔记test中
查看全部
举报