change the origin of a graph

8 views (last 30 days)
Hi,
I want to draw a graph and its origin must be in the upper left corner of output. The numbers should increase positively down the y-axis. How can I do this?
Thanks

Accepted Answer

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 9 Nov 2021
x = 1:13; y = 2*x+3;
plot(x, y, 'r*--'), grid on
set(gca, 'YDir','reverse'), xlabel('x'), ylabel('y')

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by