How can I create a bar plot like the following figure in Matlab? Any help? Thank you.

2 ビュー (過去 30 日間)
sam
sam 2022 年 11 月 27 日
編集済み: sam 2022 年 11 月 27 日
How can I create a bar plot like the following figure in Matlab?

採用された回答

Image Analyst
Image Analyst 2022 年 11 月 27 日
@the cyclist @Walter Roberson has the Mind Reading Toolbox. We may just have to wait for him to answer.
@sam saying "Sorry, this doesn't help." doesn't help. Make it easy for people to help you, not hard.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
r = 0.5 + 0.5 * rand(6, 4)
r = 6×4
0.7452 0.7060 0.5717 0.5609 0.8180 0.7605 0.8828 0.8549 0.9438 0.6677 0.7234 0.8554 0.8884 0.7851 0.8623 0.8524 0.7682 0.9251 0.8682 0.5801 0.8509 0.7191 0.8211 0.7480
bar(r)
ylabel('Accuracy');
xlabel('Classifier')
xticklabels({'Support Vector Machine', 'Logistic Regression', 'Naive Bayes', 'Decision Tree', 'K Nearest Neighbor', 'Random Forest'})
  5 件のコメント
Image Analyst
Image Analyst 2022 年 11 月 27 日
Then just post your Excel workbook. Basically if we're to do it in MATLAB, we're going to need data, right? I just solved it with random data but I'm sure you'd rather solve it using your actual data, right? If right, then post the data in whatever form you have it.
sam
sam 2022 年 11 月 27 日
@Image Analyst I have finished it following your answers. Thank you.

サインインしてコメントする。

その他の回答 (1 件)

Voss
Voss 2022 年 11 月 27 日
  3 件のコメント
the cyclist
the cyclist 2022 年 11 月 27 日
@sam, if you want help on this forum, you need to make more effort yourself.
The simple reality is that one can make a chart that is nearly identical to the image you posted, using the bar function that @Voss recommended.
When you say, "this doesn't help", what do you expect from us? To read your mind, and understand why it doesn't help? We can't do that.
Please explain, in more than one sentence, what you have tried yourself (e.g. post your own code), where you are stuck, what you don't understand about the bar function, etc.
sam
sam 2022 年 11 月 27 日
@the cyclist Hi I have attached an image. I like to have a bar chart like the attached image. This type of bar chart are not in the documentation suggested by @Voss

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by