用matplotlib模块 #!usr/bin/env python #encoding:utf-8 ''' __Author__:沂水寒城 功能:折线图.散点图测试 ''' import random import matplotlib import matplotlib.pyplot as plt def list2mat(data_list,w): ''' 切片.转置 ''' mat=[] res=[] for i in range(0,len(data_list)-w+1,w): mat
Matplotlib基本图形之折线图折线图特点 折线图是用折线将各数据连起来组成的图形常用来观察数据随时间变化的趋势例如:股票价格,温度变化,等等 示例代码: import os import time import numpy as np import matplotlib.pyplot as plt import matplotlib.dates as mdates basedir = os.path.dirname(os.path.abspath(__file__)) resultdir