Filter löschen
Filter löschen

How to rotate a figure in MATLAB?

7 Ansichten (letzte 30 Tage)
Swati Jain
Swati Jain am 21 Nov. 2017
Beantwortet: Walter Roberson am 21 Nov. 2017
Hi,
I generated a figure of step through imagesc with x,y and z values. x and y are a column vectors and dimensions of x is not equal to dimension of y and z is a matrix with no. of row equal to y and no. of column equal to x. How can I rotate this image through a small angle (10 degree), so that edge of the step look tilted. Figure is attached. Thanks in advance.

Antworten (1)

Walter Roberson
Walter Roberson am 21 Nov. 2017
Probably the easiest way is to use view(), if you do not mind that the labels and axes lines tilt as well.
If the labels and axes need to stay fixed, then you should create a hgtransform group, set the imagesc parent to be the transform, use maketform to create the transform matrix, and apply the transform to the hgtransform group

Kategorien

Mehr zu Object Containers finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by