I have a code below that highlights a defined region in a plot:
x = 1:24;a = 1;b = 50;y = a + (b-1).*rand(length(x),1);plot(x,y);h = area([18 20],[max(y) max(y)]);set(h,'FaceColor',[.5,.5,.5]);set(h,'EdgeColor',[.5,.5,.5]);h1 = get(h,'children');set(h1,'FaceAlpha',0.3);hold on;plot(x,y);hold off;axis([min(x) max(x) min(y) max(y)]);
Although this works as intended, I am unsure about what get(h,'children') does. Could anyone clarify for me what it does and what is the numeric value it returns?
Best Answer