How do i remove white parts from the contour plots?

3 visualizaciones (últimos 30 días)
Saugat Shrestha
Saugat Shrestha el 24 de Abr. de 2020
Comentada: Chenzheng Jia el 2 de Dic. de 2022
When I am plotting a contour I am getting white portions in the areas beyond the specicied range of limits. I would rather want the the colour of the extreme limits.
I hope you can help me solve this problem.

Respuesta aceptada

Walter Roberson
Walter Roberson el 24 de Abr. de 2020
constrained_data = max(min(Data, upper_limit_to_show), lower_limit_to_show);
surf(X, Y, constrained_data)
  7 comentarios
Walter Roberson
Walter Roberson el 2 de Dic. de 2022
upper_limit_to_show and lower_limit_to_show are not functions in this context: they are values that represent the upper limit of values that you want to display, and the lower limit that you want to display.
For example,
Data = imread('flamingos.jpg');
upper_limit_to_show = 200;
lower_limit_to_show = 150;
constrained_data = max(min(Data, upper_limit_to_show), lower_limit_to_show);
imshow(Data); title('original');
imshow(constrained_data); title('constrained')
Chenzheng Jia
Chenzheng Jia el 2 de Dic. de 2022
Thank you very much.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by