title: Matlab - anti-aliased rendering of figure containing plot lines and surf
body: <p>I'm looking for a way to export anti-aliased graphics containing lines and "surf" at the same time.</p>
  
  <p>With HG2, the "plot" lines are anti-aliased by default but the anti-aliasing is switched off once I insert a "surf". The closest I could get was by using <a href="https://github.com/altmany/export_fig" rel="nofollow">"export_fig"</a> but it's not exporting dashed lines properly.</p>
  
  <pre><code>r=100;
  theta = linspace(0,2*pi,100);
  [x,y] = pol2cart(theta,r*ones(1,100));
  [x1,y1] = pol2cart(theta,0.9*r*ones(1,100));
  
  rc = 0.1;
  h = 0.3;
  m = h/rc;
  [R,A] = meshgrid(-linspace(0,rc,11),linspace(0,2*pi,50));
  X3 = R .* cos(A)*r;
  Y3 = R .* sin(A)*r;
  Z3 = -(m*R+h)*r;
  
  
  hold on
  plot(x,y)
  plot(x1,y1,'-.')
  
  %plots are with anti-aliasing
  
  s = surf(X3,Y3,Z3)
  
  
  s.FaceLighting = 'gouraud';
  s.AmbientStrength = 0.6;
  s.DiffuseStrength = 0.8;
  s.SpecularStrength = 0.9;
  s.SpecularExponent = 25;
  s.BackFaceLighting = 'reverselit';
  s.FaceColor=[0.25 0.25 0.25];
  
  set(s,'FaceAlpha',0.3);
  set(s,'EdgeAlpha',0);
  
  view(2)
  %anti-aliasing is gone...
  </code></pre>