3 Star 6 Fork 0

weitec/MLiA_StudyCode

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
matplotlibTest.py 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
weitec 提交于 2018-01-24 15:35 . 第一次更新,上传所有文件
# import matplotlib.pyplot as plt
#
# x = [1,2,3]
# y = [5,7,4]
#
# x2 = [1,2,3]
# y2 = [6,8,5]
#
# plt.plot(x, y, label='First Line')
# plt.plot(x2, y2, label='Second Line')
#
# # plt.xlabel('Plot Number')
# # plt.ylabel('Important var')
# # plt.title('Interesting Graph\nCheck it out')
# plt.legend()
#
# plt.show()
import matplotlib.pyplot as plt
x = [1,2,3,4,5,6,7,8]
y = [5,2,4,2,1,4,5,2]
plt.scatter(x,y, label='skitscat', color='k', s=25, marker="o")
plt.xlabel('x')
plt.ylabel('y')
plt.title('Interesting Graph\nCheck it out')
plt.legend()
plt.show()
# from mpl_toolkits.mplot3d import Axes3D
# import matplotlib.pyplot as plt
# import numpy as np
#
# # Fixing random state for reproducibility
# np.random.seed(19680801)
#
#
# def randrange(n, vmin, vmax):
# '''
# Helper function to make an array of random numbers having shape (n, )
# with each number distributed Uniform(vmin, vmax).
# '''
# return (vmax - vmin)*np.random.rand(n) + vmin
#
# fig = plt.figure()
# ax = fig.add_subplot(111, projection='3d')
#
# n = 100
#
# # For each set of style and range settings, plot n random points in the box
# # defined by x in [23, 32], y in [0, 100], z in [zlow, zhigh].
# for c, m, zlow, zhigh in [('r', 'o', -50, -25), ('b', '^', -30, -5)]:
# xs = randrange(n, 23, 32)
# ys = randrange(n, 0, 100)
# zs = randrange(n, zlow, zhigh)
# ax.scatter(xs, ys, zs, c=c, marker=m)
#
# ax.set_xlabel('X Label')
# ax.set_ylabel('Y Label')
# ax.set_zlabel('Z Label')
#
# plt.show()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/weitec/MLiA_StudyCode.git
git@gitee.com:weitec/MLiA_StudyCode.git
weitec
MLiA_StudyCode
MLiA_StudyCode
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385