python画图工具指南
发布时间
阅读量:
阅读量
一、python工具
Python程序执行环境:Anaconda3
Anaconda3使用方式:Jupyter Notebook
系统平台:Windows 11
二、折线图
from matplotlib import pyplot
import matplotlib.pyplot as plt
from math import sqrt
import pandas as pd
from matplotlib.pyplot import MultipleLocator
plt.figure(figsize=(10,5))
x = []
actual = [1, 2, 3, 4, 5, 6, 7, 8]
for i in range(1,len(actual)+1):
x.append(i)
print(x)
plt.plot(x,[1,2,3,4,5,6,7,8],'b',marker='o',ms=10,label="lable1")
plt.plot(x,[4,2,4,5,7,8,1,5],'r', marker='v',ms=12,label="lable2")
x_major_locator=Multi
全部评论 (0)
还没有任何评论哟~
