Contourf fill color in bounded regions

조회 수: 3 (최근 30일)
Jonathan
Jonathan 2014년 3월 2일
댓글: Jonathan 2014년 3월 2일
Hi,
I have a contour plot (attached) for which I need filled contours, so I'm using contourf. This has worked for me really well until recently, when I found that our newest data effectively enclosed a region of NaNs that then became--instead of white or transparent--red, the lowest color on my color axis. I'd like to be able to change this value to white if possible. Can anyone advise on how to do this? Similar questions on the Mathworks website didn't quite have the right answer for my purposes.
My code for the second of the five panels in the attached is a bit messy, but the gist of it is simply:
contourf(X,Y, Z,'*','EdgeColor','none);
Thanks in advance.
  댓글 수: 1
Jonathan
Jonathan 2014년 3월 2일
From Matlab-related website:
"Contourf has a longstanding bug in handling internal masked regions; I hope you don't run into it. Both Mike D and I have tried to figure out how to fix that bug, but so far without success."
This appears to be what I'm seeing, so I'm hoping someone has experience overcoming this? If not I'll have to remove a few pixels from the matrix I use to populate the plot so that it doesn't interpret the masked internal areas as internal... That's a non-ideal clunky solution, though, since I'll have to do so manually every time I get new output.

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

답변 (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