环境
Python3
Mac OS
[python] view plain copy
# coding:utf-8
"""
Author: roguesir
Date: 2017/8/30
GitHub: https://roguesir.github.com
Blog: http://blog.csdn.net/roguesir
"""
import matplotlib.pyplot as plt
import numpy as np
n =1024 # data size
X = np.random.normal(0, 1, n)
Y = np.random.normal(0, 1, n)
T = np.arctan2(Y, X)# for color later on
plt.scatter(X, Y, s=75, c=T, alpha=.5)
plt.xlim(-1.5, 1.5)
plt.xticks(())# ignore xticks
plt.ylim(-1.5, 1.5)
plt.yticks(())# ignore yticks
plt.show()
版权声明:本文为博主原创文章,未经博主允许不得转载。
本文已收录于以下专栏:
网友评论