How to make separate graph for each class?
3 ビュー (過去 30 日間)
古いコメントを表示
Hello, i have 6 classes in my project and i need to make one graph for each class... now my graph looks like this and i need graphs with average precision for each class...
...
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1375069/image.png)
i want each graph to look like this :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1375074/image.jpeg)
6 件のコメント
Cris LaPierre
2023 年 5 月 5 日
Your data does not appear to have copied correctly. Try saving your variables to a mat file and then attach that to your post using the paperclip icon.
回答 (1 件)
Shree Harsha Kodi
2023 年 6 月 22 日
To make separate graphs for each class in MATLAB, you can follow these general steps:
1) Identify the classes in your dataset. Depending on your data format, you may need to extract the class labels from your data.
2)Iterate over the classes and create separate graphs for each class. Within each iteration, filter the data points based on the current class and plot them.
Go through the below documentation for a better understanding:
MATLAB Scatter Plot: https://www.mathworks.com/help/matlab/ref/scatter.html
MATLAB Figure Properties: https://in.mathworks.com/help/matlab/creating_plots/setting-graph-properties.html
MATLAB Control Flow (for loop): https://in.mathworks.com/help/matlab/ref/for.html
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Specifying Target for Graphics Output についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!