1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > matlab散点图matplotlib散点图

matlab散点图matplotlib散点图

时间:2022-10-04 10:55:54

相关推荐

matlab散点图matplotlib散点图

clear all;figure;x=[1 5 6 7 9 5 1 3 12 20];y=[20 15 6 3 1 5 3 0 1 5];subplot(1,2,1)scatter(x,y);subplot(1,2,2)scatter(x,y,[],[1 0 0],'fill');%绘制散点图

import matplotlib.pyplot as pltimport numpy as npimport mathfrom mpl_toolkits.mplot3d import Axes3Dx=[1,5,6,7,9,5,1,3,12,20]y=[20,15,6,3,1,5,3,0,1,5]plt.figure(figsize=(8,8))plt.subplot(1,2,1)plt.scatter(x,y)plt.subplot(1,2,2)plt.scatter(x,y,c=[1,0,0])plt.show()

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。