Filter löschen
Filter löschen

Contourf fill color in bounded regions

3 Ansichten (letzte 30 Tage)
Jonathan
Jonathan am 2 Mär. 2014
Kommentiert: Jonathan am 2 Mär. 2014
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 Kommentar
Jonathan
Jonathan am 2 Mär. 2014
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Contour Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by