文章目录
seaborn 安装
代码语言:javascript
复制pip install seaborn
源代码
代码语言:javascript
复制# -*- coding:utf-8 -*-
# /usr/bin/python
'''
@Describe: pip install seaborn
@Evn :
@Date : 2019-07-28 11:29
'''
'''
数据可视化
'''
import matplotlib.pyplot as plt
from numpy.random import normal
x = normal(size=100)
plt.hist(x, bins=20)
plt.savefig("./1.png")
#plt.show(1)
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax = fig.gca(projection='3d')
X = np.arange(-10, 10, 0.1)
Y = np.arange(-10, 10, 0.1)
X, Y = np.meshgrid(X, Y)
R = np.sqrt(X**2 Y**2)
Z = np.sin(R)
surf = ax.plot_surface(X, Y, Z