matplotlib绘图pie
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/5/28 16:05 # @Author : zhang chao # @File : test.py import matplotlib.pyplot as plt labels='Frogs','Hogs','Dogs','Logs'#定义标签 sizes=...
阅读全文
matplotlib绘图3
摘要:#scatter fig=plt.figure() ax=fig.add_subplot(3,3,1)#3行3列 第一个图 n=128 X=np.random.normal(0,1,n) Y=np.random.normal(0,1,n) T=np.arctan2(Y,X)#T用来上色的 #plt.
阅读全文
matplotlib绘图2
摘要:fig=plt.figure() fig.add_subplot(3,3,1)#3行3列 第一个图 n=128 X=np.random.normal(0,1,n) Y=np.random.normal(0,1,n) T=np.arctan2(Y,X)#T用来上色的 plt.axes([0.025,0.025,0.95,0.95])#显示的范围 plt.scatter(X,Y,s=75,c=T,a...
阅读全文
python matplotlib绘图
摘要:import numpy as np import matplotlib.pyplot as plt from scipy.constants.constants import alpha from matplotlib.patches import ArrowStyle x=np.linspace(-np.pi,np.pi,256,endpoint=True) #np.linspace定义横轴...
阅读全文
matplotlib绘图
摘要:fig = plt.figure() ax=plt.gca() timeList = np.array(timeList) timeList=timeList*100 timeList1 = np.array(timeList1) timeList1=timeList1*100 timeList2 = np.array(timeList2...
阅读全文