MATLAB Answers


rotate my countour plot without changing the axes

Ernest Adisi さんによって質問されました 2018 年 8 月 9 日
最新アクティビティ Ameer Hamza
さんによって コメントされました 2018 年 8 月 13 日
I have this plot which is fine, although, I want to rotate it 180 degrees; I tried the rotate function but get the following.
Error using rotate (line 33) H must contain axes children only.
i don't understand it. this was what i coded
title('V-mean velocity profile')
hcb= colorbar;
rotate(h,[0 0 1],180)
Does anyone know how to rotate a contour plot without changing the axes please?

  0 件のコメント

サインイン to comment.

2 件の回答

Ameer Hamza
回答者: Ameer Hamza
2018 年 8 月 9 日

rotate() function documentation does not include contour objects for rotation. However, for 180-degree rotation, the following will work
contourf(rot90(Z, 2));

  2 件のコメント

Ernest Adisi 2018 年 8 月 13 日
can you show me how I include that code for my plot with contourf(X,Y,Vq)please
Ameer Hamza
2018 年 8 月 13 日
Try this
contourf(X,Y,rot90(Vq, 2));

サインイン to comment.

Walter Roberson
回答者: Walter Roberson
2018 年 8 月 9 日

You can create a hgtransform group, parent the contour plot to it, and use makehgtform to create a transformation matrix that you can apply to the hgtransform group.

  0 件のコメント

サインイン to comment.

Translated by