亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

python利用scatter繪畫散點圖

 更新時間:2022年06月21日 11:53:49   作者:云邊有把小AK  
這篇文章主要介紹了python利用scatter繪畫散點圖,文章圍繞主題展開詳細的內容介紹,具有一定的參考價值,需要的小伙伴可以參考一下,希望對你的學習有所幫助

scatter繪畫散點圖代碼如下:

import matplotlib.pyplot ?as plt
plt.scatter(x,y,
? ? ? ? ? ? ? ? s = 20
? ? ? ? ? ? ? ? c='b'
? ? ? ? ? ? ? ? marker=‘o'
? ? ? ? ? ? ? ? cmap=None,
? ? ? ? ? ? ? ? norm=None,
? ? ?? ? ? ? ? ?vmin=None,
? ? ? ? ? ? ? ? vmax=None,
? ? ? ? ? ? ? ? alpha=None,
? ? ? ? ? ? ? ? linewidths=None,
)

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
?
x=np.random.randint(0,10,10)
y=np.random.randint(0,10,10)
print(x)
print(y)
plt.scatter(x,y,s=50)默認形狀圓點,顏色b 藍色,大小50

out:

[5 1 5 3 1 5 0 5 4 7]
[8 2 7 7 8 6 3 8 5 9]

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
x = np.array([[0,0],[0,1],[1,1],[3,2],[-2,3],[1,2],[4,3]])
print(x)
plt.scatter(x[:,0],x[:,1],marker='x',color='k',s=20)#點的形狀x,顏色黑色,大小20

 out:

[[ 0  0]
 [ 0  1]
 [ 1  1]
 [ 3  2]
 [-2  3]
 [ 1  2]
 [ 4  3]]

到此這篇關于python利用scatter繪畫散點圖的文章就介紹到這了,更多相關python scatter繪畫內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!

相關文章

最新評論