rotate of a contourf contourplot

4 views (last 30 days)
Brecht
Brecht on 6 Apr 2018
Answered: Brecht on 6 Apr 2018
Hi,
I would like to plot my contourf plot in the xz plane instead of the xy plane. Before (matlab2014a) I extracted the patches of the plot and swapped the X,Y,Z data of the patches accordingly.
However in more recent versions of Matlab I cannot access the patches anymore. Therefore I tried something as:
[~,h]=countourf(...); dir=[1,0,0]; rotate(h,dir,90);
This works for a surf graphics object, but not for a contourf graphics object, but it doesn't raise an exception either.
What could be a workaround?
Thank you in advance!
Kind regards, bvrm

Answers (1)

Brecht
Brecht on 6 Apr 2018
https://it.mathworks.com/matlabcentral/answers/159354-rotating-contourf-in-r2014b
I found this solution. Important: -The contourf is embedded in a hgtransform object -Adjust the axis limits manualy after transformation. -All transformations are compared to the original axis, so make a full transformation matrix once and then set the Matrix propery of the hgtransform object.

Community Treasure Hunt

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

Start Hunting!