필터 지우기
필터 지우기

Problem with contourf plotting

조회 수: 7 (최근 30일)
Michael
Michael 2014년 10월 17일
댓글: Michael 2014년 10월 20일
I seem to have a problem with the contourf function. The data I am plotting (see attached) seems to plot fine with the 'surf' command and 'contour' as well, but the plot changes when I use contourf. I am using the following command for plot the data:
contourf(p_R,Q_R,pow_R);
I have included examples of each of the plots to show the difference between contourf, surf, and contour. I have reproduced this issue on another computer. Does anyone know if there is some bug in contourf that would cause this issue?
I found a work around by using 'flipud' on each of the matricies, but I don't know why this works.
contourf(flipud(p_R),flipud(Q_R),flipud(pow_R));
I have included a plot of this result as well.
Any ideas on what the problem is? (I am running 2013b)
Thanks, -Michael

채택된 답변

Mike Garrity
Mike Garrity 2014년 10월 17일
I think I've seen that one before and that it's fixed in R2014b.
If I remember correctly, it had something to do with the way the grid doubled over on itself as you can see along the right side of your example if you zoom in. Even in the best case that sort of doubling over causes some strange effects with contours. It's not really clear to me exactly what's "correct" in this situation, but clearly what 13b is doing is not correct! Here's what I get with 14b.
Any chance you could give it a try with the new release and see what you think?
  댓글 수: 1
Michael
Michael 2014년 10월 20일
Awesome. Thanks. Looks like it is time to upgrade.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by