rotate of a contourf contourplot

1 回表示 (過去 30 日間)
Brecht
Brecht 2018 年 4 月 6 日
回答済み: Brecht 2018 年 4 月 6 日
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

回答 (1 件)

Brecht
Brecht 2018 年 4 月 6 日
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.

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by