plotting horizontal scatter plots
5 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
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
.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Scatter Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!