Filling Area with gray color scale.
18 views (last 30 days)
Show older comments
I am working on a figure and a came up with a surface area which is cone shape(plotted by two variables X and Y), and has five layers. I want to fill the area of each layer based on the intensity of gray color represented by matrix Z. The figures changes therefore i cannot save it first and modify it rather I want to modify it on the plot as facecolor. When I use imshow(I, []);, the two figures are plotted differently.
How can I fill the area (Area) with various layers of imshow(I, []) colors? Be free to use ant example or linspace to generate X, Y and Z values.
X=[j,i]; % currently j=5,the maximum value of L i=301 ,but this can change based on the variable.
Y=[j,i]; % Y is not directly related to X, but the size varies.
Z=[j,i-1]; % Z varies from 0 to max of 100 and is set to represent a measure of the intensity of the gray color
I = mat2gray(Z,[0 max(max(Z))]);
imshow(I, []);
Color=['I' 'r' 'c' 'm' 'k'];
figure(14)
hold on
for j=L:-1:1 % is set currently at 5.
Area(j,:)=area(X(j,:),Y(j,:),'FaceColor',Color(j)); %Area layers.
end
10 Comments
Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!