spatara
spatara

Reputation: 901

Matlab: mirror results along xaxis

I can't seem to find any documentation explaining how to mirror my matlab results.

ie I have this:

enter image description here

and I want my results to be upside down....

using set(gca, 'XDir', 'reverse') and set(gca, 'XDir', 'reverse'Y do not work for me ( I am using figue and quiver to plot)

Upvotes: 0

Views: 1699

Answers (1)

chappjc
chappjc

Reputation: 30589

For display purposes, you can move the origin to the upper left corner via:

axis ij

By default when plotting it uses axis xy. Excerpt from axis documentation:

axis IJ puts MATLAB into its "matrix" axes mode. The coordinate system origin is at the upper left corner. The i axis is vertical and is numbered from top to bottom. The j axis is horizontal and is numbered from left to right.

axis XY puts MATLAB into its default "Cartesian" axes mode. The coordinate system origin is at the lower left corner. The x axis is horizontal and is numbered from left to right. The y axis is vertical and is numbered from bottom to top.

Upvotes: 3

Related Questions