欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

python利用scatter繪畫散點(diǎn)圖

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

scatter繪畫散點(diǎn)圖代碼如下:

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)默認(rèn)形狀圓點(diǎn),顏色b 藍(lán)色,大小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)#點(diǎn)的形狀x,顏色黑色,大小20

 out:

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

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

相關(guān)文章

最新評論