Sorry for asking stupid questions, but I'm not getting it
Main Problem: Bar chart is always overlaying line plot
Month = [1 2 3 4 5 6 7 8 9 10 11 12]Temp = [15.8 15.8 15.8 15.7 15.8 15.1 14.7 14.6 15.0 15.7 16.2 16.1]Prec = [88.0 108.4 129.3 169.5 197.3 212.9 204.3 145.6 121.0 116.2 101.3 99.9] left_color = [0 0 0] right_color = [0 0 0] set(figure(1),'defaultAxesColorOrder',[left_color; right_color]);holdxticks([1 2 3 4 5 6 7 8 9 10 11 12]) xlabel ('Monate')h1=plot(Month,Temp,'color','r')axis ([1 12 0 30])yyaxis rightaxis ([1 12 0 300]) h2=bar(Month,Prec,'b')
I know, this alreasy looks confused, because I am, I changed everything thousand times, now I'm absolutely coinfus.
What I was trying to do:
Plotting a line graph and bars in oine figure. Line graphe in foreground.
Left yaxis for the Line Graph
Right yaxis for the bars
bars blue, line red
So far, everythign worked but I'm not managing to bring the Line graph to the foreground
Help needed. Thank you
Best Answer