MATLAB: I am trying to Combine a Line and a Bar Chart using Two y-Axes.

bargraphchart;graph

I am trying to combine a Line and a Bar Chart using two y-axes. I am using the following code and the line chart get hidden behind the bar graph.
C1=[0.26;0.35;0.27];
C2=[21;29;27];
set(gca,'XTickLabel',{'0.08 g ','0.2 g ','0.40 g '},'FontWeight','bold')
yyaxis left
p = plot(C1);
ylim([0 0.4])
yyaxis right
b=bar(C2);
ylim([0 30])
Can someone help me solve this problem?

Best Answer

...
yyaxis right
hB=bar(C2,'FaceAlpha',0.80);
...
Salt to suit...