plotting horizontal scatter plots

22 ビュー (過去 30 日間)
Catarina
Catarina 2023 年 7 月 3 日
コメント済み: Star Strider 2023 年 7 月 4 日
Hello,
How can i display scatter points horizontally in a horizontal bar plot? Like, instead of having the scatter plot plotting from the x axis, making it plot from the y axis.

採用された回答

Star Strider
Star Strider 2023 年 7 月 3 日
Reverse the ‘x’ and ‘y’ coordinates in the scatter plot —
x = 1:5;
y = rand(size(x));
figure
barh(rand(size(x)))
hold on
scatter(y, x, 100, y, 'filled', 'p')
hold off
.
  2 件のコメント
Catarina
Catarina 2023 年 7 月 4 日
thank you!
Star Strider
Star Strider 2023 年 7 月 4 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by