Obtain the desired orientation without reversing the direction of the two axes
1 回表示 (過去 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!