contourf change plot color

7 visualizaciones (últimos 30 días)
Steven
Steven el 18 de Abr. de 2012
I am trying to change the contourf plot color to white. I understand that Matlab has several built-in colormaps and changing between these is easy. However, I just want the contour lines on a white background. I know plotting on a white background can be done with the contour command, but the data I am plotting is incomplete. "Contourf" will complete the data islands, but "contour" will not approximate the missing points on my map. Thank you for your help in advance!

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 18 de Abr. de 2012
contourf(magic(5))
colormap([1 1 1]) %set the colormap to one level - white
  3 comentarios
Steven
Steven el 19 de Abr. de 2012
I plugged "colormap([1 1 1])" into my code. Although it is turning the plot color white, it is also turning the plot title and axes white too. Is there a way to keep these black? Also, once I apply "colormap([1 1 1])", any colormap I change to after that only displays one color. For example colormap jet will only display one shade of blue instead of all of the map colors. Is there any way to restor the full color range? I have been trying to get the "refresh" or "clf" commands to work, but they either do nothing or remove the whole object.
Steven
Steven el 19 de Abr. de 2012
haha. . . "colormap white" fixes all of these issues. I think sometimes I am assuming things are more complicated then they have to be. Thanks for listening.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by