常见的Python框架--matplotlib

matplotlib

获取方法:

https://matplotlib.org/users/installing.html#building-on-linux

sudo apt-get install python-matplotlib #python2.
sudo apt-get install python3-matplotlib #python3.

简介

用于数据可视化

#easy example
import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(-1, 1, 50)
y = 2*x + 1
# y = x**2
plt.plot(x, y)
plt.show()

二维图

点线图

常见的Python框架--matplotlib_第1张图片

t = np.arrange(0.0, 5.0, 

你可能感兴趣的:(Python,python,matplotlib)