首页 > 其他分享 >08Scatter散点图

08Scatter散点图

时间:2023-01-31 20:44:31浏览次数:48  
标签:1.5 plt random 散点图 np 08Scatter

import matplotlib.pyplot as plt
import numpy as np

n=1024
X = np.random.normal(0,1,n)
Y = np.random.normal(0,1,n)
T = np.arctan2(Y,X)#for color value

plt.scatter(X,Y,s=75,c=T,alpha=0.5)#alpha(透明度)

plt.xlim((-1.5,1.5))
plt.ylim((-1.5,1.5))


plt.show()

image-20230131172217884

标签:1.5,plt,random,散点图,np,08Scatter
From: https://www.cnblogs.com/lyc2001/p/17080712.html

相关文章