scatter plot (need matlab script)
14 ビュー (過去 30 日間)
古いコメントを表示
x=[2.6498, 5.4147, 7.7189, 7.9493, 7.2581, 47.5806, 44.1244, 78.4562, 73.3871, 74.3088, 91.8203, 96.659, 95.9677, 36.9816, 35.1382, 35.5991, 40.2074, 16.4747, 9.7926, 68.0876];
y=[11.4035, 7.3099, 14.9123, 95.0292, 85.6725, 91.5205, 82.1637, 13.7427, 14.3275, 27.193, 183.9181, 177.4854, 192.1053, 157.0175, 163.4503, 175.731, 172.2222, 106.1404, 114.9123, 123.6842];

2 件のコメント
the cyclist
2021 年 4 月 21 日
編集済み: the cyclist
2021 年 4 月 21 日
If you expect us to spend time helping you solve your problem, you should spend more time explaining what you are trying to do, and ask specific questions about where you are stuck.
The image you posted is not a scatter plot. Do you want a scatter plot of x and y? Or are you trying to create a figure like the one in the picture?
採用された回答
Atsushi Ueno
2021 年 4 月 21 日
x=[2.6498, 5.4147, 7.7189, 7.9493, 7.2581, 47.5806, 44.1244, 78.4562, 73.3871, 74.3088, 91.8203, 96.659, 95.9677, 36.9816, 35.1382, 35.5991, 40.2074, 16.4747, 9.7926, 68.0876];
y=[11.4035, 7.3099, 14.9123, 95.0292, 85.6725, 91.5205, 82.1637, 13.7427, 14.3275, 27.193, 183.9181, 177.4854, 192.1053, 157.0175, 163.4503, 175.731, 172.2222, 106.1404, 114.9123, 123.6842];
histogram2(x,y,11,'DisplayStyle','tile','ShowEmptyBins','on','XBinLimits',[0 110],'YBinLimits',[0 220]);
colorbar;
colormap('jet');
xlabel('\bfX');
ylabel('\bfY');
title('\bfJoint Distribution - X and Y');
その他の回答 (2 件)
David Hill
2021 年 4 月 21 日
x=[2.6498, 5.4147, 7.7189, 7.9493, 7.2581, 47.5806, 44.1244, 78.4562, 73.3871, 74.3088, 91.8203, 96.659, 95.9677, 36.9816, 35.1382, 35.5991, 40.2074, 16.4747, 9.7926, 68.0876];
y=[11.4035, 7.3099, 14.9123, 95.0292, 85.6725, 91.5205, 82.1637, 13.7427, 14.3275, 27.193, 183.9181, 177.4854, 192.1053, 157.0175, 163.4503, 175.731, 172.2222, 106.1404, 114.9123, 123.6842];
n=histcounts2(x,y,0:10:110,0:20:220);
n=rot90(n);
0 件のコメント
Steven Lord
2021 年 4 月 21 日
That doesn't look like a scatter plot. It looks more like a heatmap chart. Though you are going to need to bin your data if you want to make a heatmap, and David Hill's suggestion of histcounts2 seems reasonable.
As a general idea, if you have an idea of a type of plot you want to create but you're not sure if there's a function to create that plot, click on the Plots tab of the Toolstrip. You can expand the Plots section of that tab to see thumbnails of some of the types of plots you can create with MATLAB. The name of the function that you'd use to create that type of plot is below the thumbnail. If you have your data selected in the Workspace desktop component you can even limit what gets shown to the types of plots compatible with the selected data. heatmap and pcolor in the "MATLAB Image Plots" section look close to the picture you showed.
1 件のコメント
the cyclist
2021 年 4 月 21 日
Solid advice here.
参考
カテゴリ
Help Center および File Exchange で Data Distribution Plots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!