title: Matlab: bar No public property CData exists
body: <p>The Matlab example code cannot run in Matlab 2017a (Linux 64bits):
  <a href="https://cn.mathworks.com/help/matlab/ref/bar.html" rel="nofollow noreferrer">https://cn.mathworks.com/help/matlab/ref/bar.html</a></p>
  
  <pre><code>b = bar(rand(10,1));
  b.FaceColor = 'flat';
  b.CData(2,:) = [.5 0 .5];
  </code></pre>
  
  <p>It can not color the specific bar and warns as:</p>
  
  <blockquote>
    <p>No public property CData exists for class matlab.graphics.chart.primitive.Bar.</p>
  </blockquote>
  
  <p>I don't know it is a specific feature merely for Matlab 2017b?</p>
  
  <p>This code is only to color the specific bar. In Matlab 2012a, it can be easily done by:</p>
  
  <pre><code>bh=bar(MyStem); h=get(bh, 'children');
  shading flat;  set(h,'FaceVertexCData',MyColor);
  </code></pre>
  
  <p>I cannot understand why Matlab 2017 removes this feature.</p>