Adding Bar graph with another plot, convert the bar graph with a color axis, tittle in one figure?
1 view (last 30 days)
I want to draw this Bar, but want to add color in the bar chart, title, axis, along with the bar graph want to add the original plot(curve) and legend. I am trying hold on command but it figure is not icking . Kindly tell me how to include all of them in one figure.
x = [0 0.2 0.4 0.7 0.8 1]; % start of bar y = zeros(length(x),1); dx = diff([x 1]); % width of bar dy = [1 5 7 9 3];
for ii=1:length(x) rectangle('position',[x(ii) y(ii) dx(ii) dy(ii)]) end
Preethi on 18 Jan 2017
hope this is helpful
x = [0 0.2 0.4 0.7 0.8 1]; % start of bar
y = zeros(length(x),1); dx = diff([x 1]); % width of bar
dy = [1 5 7 9 3];