![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1761419/image.png)
Plot different features with Graph
5 ビュー (過去 30 日間)
古いコメントを表示
Can i know the way to plot such graph?
Thank you
0 件のコメント
回答 (1 件)
Gautam
2024 年 8 月 28 日
Hello Selina,
You can make the plot as shown in the reference image you shared by using the “scatter” and “tiledlayout” functions. The function “tiledlayout” lets you plot multiple axes as tiles in a figure window and the “scatter” function makes the scatterplot.
The code below shows a way to make the corresponding plot
t = tiledlayout(2,2);
nexttile;
x = randn(30,1);
y = randn(30,3);
scatter(x,y(:,1),"blue", 'filled');
hold on;
scatter(x,y(:,3),"red");
hold on;
scatter(x,y(:,2),"green", 'filled');
ylabel("Total Number of Impurities")
nexttile;
x = randn(30,1);
y = randn(30,3);
scatter(x,y(:,1),"blue", 'filled');
hold on;
scatter(x,y(:,3),"red");
hold on;
scatter(x,y(:,2),"green", 'filled');
legend({'AA', 'A', 'B'});
nexttile;
x = randn(30,1);
y = randn(30,3);
scatter(x,y(:,1),"blue", 'filled');
hold on;
scatter(x,y(:,3),"red");
hold on;
scatter(x,y(:,2),"green", 'filled');
ylabel("EBN Colour");
xlabel("Curvature");
nexttile;
x = randn(30,1);
y = randn(30,3);
scatter(x,y(:,1),"blue", 'filled');
hold on;
scatter(x,y(:,3),"red");
hold on;
scatter(x,y(:,2),"green", 'filled');
xlabel("Total EBN Area");
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1761419/image.png)
You can refer to the following documents for more information on the “scatter” and “tiledlayout” functions:
1. “sactter” : https://www.mathworks.com/help/matlab/ref/scatter.html
2. “tiledlatout” : https://www.mathworks.com/help/matlab/ref/tiledlayout.html
Hope this helps
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Line Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!