title: Transparent background for identification of 0 and 1 in a MATLAB figure
body: <p>I've sunlight and eclipse detection in my code. I'd like to highlight sunlight and eclipse detection in every plot I'm generating.</p>
  
  <p>Suppose </p>
  
  <pre><code>sun_avail = 0; % means spacecraft is in eclipse
  sun_avail = 1; % means spacecraft is in sunlit
  </code></pre>
  
  <p>I've set of variables (vectors (X,Y,Z)) needed to be plot in matlab figure which I'd do like this</p>
  
  <pre><code>fig = figure();
  set(fig, 'name', 'Quaternions', 'NumberTitle', 'off');
  subplot(4,1,1);
  plot(t,Qp(:,1),'b','linewidth',2);
  title('Quaternions wrt ref frame selected','fontweight','b')
  hold on;plot(t,q_dp(:,1),'-.m','linewidth',2);
  grid;zoom;
  legend('Gyro Q Attitude (Actual Gyro)','Body Q Attitude (Ideal Gyro)');
  xlabel('time in secs','fontweight','b')
  ylabel('q1','fontweight','b')
  
  subplot(4,1,2);
  plot(t,Qp(:,2),'b','linewidth',2);
  hold on;plot(t,q_dp(:,2),'-.m','linewidth',2);
  grid;zoom;
  xlabel('time in secs','fontweight','b'); 
  ylabel('q2','fontweight','b')
  
  subplot(4,1,3);
  plot(t,Qp(:,3),'b','linewidth',2);
  hold on;plot(t,q_dp(:,3),'-.m','linewidth',2);
  grid;zoom;
  xlabel('time in secs','fontweight','b');
  ylabel('q3','fontweight','b')
  
  subplot(4,1,4);
  plot(t,Qp(:,4),'b','linewidth',2);
  hold on;plot(t,q_dp(:,4),'-.m','linewidth',2);
  grid;zoom;
  xlabel('time in secs','fontweight','b');
  ylabel('q4','fontweight','b')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ADofz.jpg" rel="nofollow noreferrer">Figure looks like this</a></p>
  
  <p>Is there any way to highlight like some transparent color in the background to identify the sunlit and eclipse portions in the above matlab figure.</p>