seaborn数据可视化简单教程

2021-01-14 11:43:22 浏览数 (1)

文章目录

  • seaborn 安装
  • 源代码

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

0 人点赞