Python绘图matplotlib

#!/bin/python3
# -*- coding: utf-8 -*-

import math, os, sys, urllib, json, time

from urllib.request import urlopen
from math import sin, pi
import numpy as np 
import matplotlib.pyplot as plt

def p(x): print(x)

x = {"a":123, "b":[1,2,3], "c":("1", {"a":333})}  
p(x)

X = np.linspace(-np.pi, np.pi, 1000, endpoint=False)
S = np.tan(X)

plt.plot(X,S, color="red", label="sine")
#plt.legend(loc='upper right', frameon=False)

plt.show()


发表于:2014-10-13 14:40:20

原文链接(转载请保留): http://www.multisilicon.com/blog/a25314942.html

友情链接: MICROIC
首页