I would like to insert a vertical bar (light blue) from Time = 500 to Time = 650 to highlight that section of the curve. I believe patch is the tool to use. I followed examples provided on MathWorks, but my curve disappears when I use the recommended code. How can I incorporate patch into the code below?
plot(t,B);xlabel('Time (in days)');ylabel('Mosquitoes Searching for a Blood Meal');h_xlabel = get(gca,'XLabel');set(h_xlabel,'FontSize',14);h_ylabel = get(gca,'YLabel');set(h_ylabel,'FontSize',14);set(gca,'fontName','Helvetica');hold on;
I know that I should use patch before plotting my curve so that the vertical bar does not cover the curve.
Best Answer