title: How to smoothen shaded portion of graph in Matlab
body: <p>In matlab I have plotted 7 data points using plot function where I have used the interpl function and pchip to smoothen the plot. Then I used patch function to plot my data uncertainty(I have generated the uncertainty data first though before using patch function). Now, i would like to smoothen the uncertainty region as well. Please see attached my graph where I have smoothened the actual plot however, the shaded uncertainty still has sharp edges.</p>
  <p>I have provided the portion of the code that generates the plot and uncertainty.</p>
  <p>thanks.</p>
  <pre><code>n_1 = 250;
  xq = linspace(min(t), max(t), n_1);
  yq = interp1(t, conc_act, xq, 'pchip'); %Generating interpolated data
  plot(xq,yq,'r')   %plotting actual data along with interploated data
  
  hold on
  shadeWidth = 0.01;
  
  patch([t; flipud(t)], [mean(conc,2)-shadeWidth; flipud(mean(conc,2))+shadeWidth], 'r',       'FaceAlpha',0.25, 'EdgeColor','none')  
  
  %plotting shaded region of uncertainty where conc matrix contains all the uncertainty values 
  </code></pre>
  <p><a href="https://i.stack.imgur.com/gUnJt.jpg" rel="nofollow noreferrer">graph</a></p>