python 绘图笔记

http://old.sebug.net/paper/books/scipydoc/matplotlib_intro.html

import numpy as np
import matplotlib.pyplot as plt

x = np.linspace(0, 10, 1000)
y = np.sin(x)
z = np.cos(x**2)

plt.figure(figsize=(8,8))
plt.plot(x,y,label="$sin(x)$",color="red",linewidth=2)
plt.plot(x,z,"b--",label="$cos(x^2)$")
plt.xlabel("Time(s)")
plt.ylabel("Volt")
plt.title("PyPlot First Example")
plt.ylim(-1.2,1.2)
plt.legend()
plt.show()

仅有 1 条评论
  1. Ellcurfak

    Amoxicillin 500mg For Urinary Tract Infection Viagra Without Subscription viagra Canadian Online Pharmacy Uk Buy Periactin 4mg

    Ellcurfak 回复
发表新评论