Borrar filtros
Borrar filtros

Contourf fill color in bounded regions

3 visualizaciones (últimos 30 días)
Jonathan
Jonathan el 2 de Mzo. de 2014
Comentada: Jonathan el 2 de Mzo. de 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 comentario
Jonathan
Jonathan el 2 de Mzo. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by