Trying to plot contourf onto hgtransform is now blank
    조회 수: 7 (최근 30일)
  
       이전 댓글 표시
    
I'm trying to do the following: https://uk.mathworks.com/matlabcentral/answers/525119-plot-contour-in-xz-and-yz-plane#comment_846566
My data works when I plot it with contourf(X,Y,z) but when I try to plot it as contourf(X, Y, z,'Parent',HG) it's just blank and I have no idea why.
I have attached the X,Y,z data. I'm trying to do exactly as it says in that comment, it's exactly what I need but my contour just seems to be blank
Actually it seems like it goes blank when I try to rotate it? i have no idea anymore
댓글 수: 0
채택된 답변
  Shubham Rawat
    
 2021년 3월 17일
        Hi,
I had found that we cannot use makehgtform in non-square matrices. So, you are not able to produce results.
HG.Matrix = makehgtform('xrotate', pi/2);
Whereas in that example he is using a square matrix to transform.
To produces results for xy, yz and zx plane. You may use contourf() function with different alignments of parameters, i.e.
load('matlab.mat');
contourf(X,Y,z); %for XY plane
contourf(Y,z,X); %for YZ plane
contourf(X,z,Y); %for Xz plane
Hope this helps!
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
			
	제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

