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 leftp = plot(C1);ylim([0 0.4])yyaxis rightb=bar(C2);ylim([0 30])
Can someone help me solve this problem?
Best Answer