How do i remove white parts from the contour plots?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Saugat Shrestha
am 24 Apr. 2020
Kommentiert: Chenzheng Jia
am 2 Dez. 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.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/287125/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/287125/image.jpeg)
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 24 Apr. 2020
constrained_data = max(min(Data, upper_limit_to_show), lower_limit_to_show);
surf(X, Y, constrained_data)
7 Kommentare
Walter Roberson
am 2 Dez. 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')
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Contour Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!