Obtain the desired orientation without reversing the direction of the two axes
2 次查看(过去 30 天)
显示 更早的评论
Hi! How can I get the right figure without reversing the direction of the two axes?
p.s. The figure on the right is created by me and there may be errors on the real (y) coordinates of the matrix.
data = importdata("data.txt");
figure
plot(data(:,2), data(:,1), 'b.', 'MarkerSize', 10);
axis equal
xlim([0 512]);
ylim([0 512]);
0 个评论
采纳的回答
Star Strider
2022-12-19
Try something like this —
data = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1236147/data.txt');
figure
plot(data(:,2), data(:,1), 'b.', 'MarkerSize', 10);
axis equal
xlim([0 512]);
ylim([0 512]);
yt = yticks;
yticklabels(flip(yt))
.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!