title: How to linkdata images on Matlab polaraxes?
body: <p>I am trying to <code>linkdata</code> images on polaraxes, which is nicely described for <code>plot</code>/<code>area</code>/... as cartesian in <code>linkdata</code> documentation <a href="http://se.mathworks.com/help/matlab/ref/linkdata.html" rel="nofollow">here</a>. 
  Code where the first segment makes two images with cuts based on alpha values. 
  The second segment loops and draws those images on polaraxes. 
  After the first iteration, <code>linkdata on</code> activates but I get the notification which does not offer <code>Fix it</code> option as normally in Fig. 1. 
  I think the bug is in the fact that I cannot explicitly define the datasource of <code>linkdata</code> as images, see Attempt 1. 
  Code </p>
  
  <pre><code>close all; clear all; clc;
  af = figure('Name', 'Do Not Touch');
  %% Data generation
  f = figure;
  hax = axes(f);
  rgb = 'peppers.png';
  % http://blogs.mathworks.com/steve/2009/02/18/image-overlay-using-transparency/
  rgb = imread('peppers.png');
  I = rgb2gray(rgb);
  h = imagesc(I, 'Parent', hax);
  [M,N] = size(I);
  block_size = 50;
  P = ceil(M / block_size);
  Q = ceil(N / block_size);
  alpha_data = checkerboard(block_size, P, Q) &gt; 0;
  alpha_data = alpha_data(1:M, 1:N);
  set(h, 'AlphaData', alpha_data.^2);
  zeroFigureDecorations(hax); 
  images{1} = getframe(hax);
  
  [M,N] = size(I);
  block_size = 50*2;
  P = ceil(M / block_size);
  Q = ceil(N / block_size);
  alpha_data = checkerboard(block_size, P, Q) &gt; 0;
  alpha_data = alpha_data(1:M, 1:N);
  set(h, 'AlphaData', alpha_data.^2);
  images{2} = getframe(hax);
  
  close all;
  clearvars -except images;     
  
  %% Polar
  % http://stackoverflow.com/a/40063951/54964
  fp=figure('Name', 'Test', ...
      'Position',[200 200 851 404],'Resize','off'); % only half circle on polaraxes although warp can do eclipses
  ThetaTicks = 0*pi:pi/10:1*pi;
  pax = polaraxes( 'ThetaAxisUnits', 'radians', ...
      'ThetaLim',[min(ThetaTicks) max(ThetaTicks)],...
      'Color','none',...
      'GridAlpha',1,...
      'GridColor',[1 1 1],...
      'ThetaTick', ThetaTicks, ...
      'ThetaDir', 'counterclockwise', ...
      'Parent', fp);
  imax = axes('Parent', fp, 'Visible', 'off');
  zeroFigureDecorations(imax); 
  
  for image=images
      h = imagesc(image{1}.cdata, 'Parent', imax); 
  
      zeroFigureDecorations(imax); 
  
      linkdata on; 
  
      angleRadians=-pi;
      I = getframe(pax);
      I = I.cdata;
      [x, y, z]=makePolar(I, angleRadians);
      imax.Children = warp(x, y, z, I);
      set(imax,'view',[-180 -90],'Visible','off');
      axis(imax,'tight')
      pause(0.5);
  end
  
  function zeroFigureDecorations(ax)
  axis(ax, 'tight');
  set(ax, 'yTickLabel', []);
  set(ax, 'xTickLabel', []);
  set(ax, 'Ticklength', [0 0]); % http://stackoverflow.com/a/15529630/54964
  colormap(ax, gray(1024));
  box(ax, 'off');
  axis(ax, 'off');
  end
  </code></pre>
  
  <p>Fig. 1 Single images are correct on polaraxes, here after the second iteration; the top bar shows the failed <code>linkdata</code> attempt and does not offer <code>Fix it</code> option like normally </p>
  
  <p><a href="https://i.stack.imgur.com/rSOSb.png" rel="nofollow"><img src="https://i.stack.imgur.com/rSOSb.png" alt="enter image description here"></a></p>
  
  <h2>Attempt 1</h2>
  
  <p>To explicitly set <code>guihandles</code> and <code>datasources</code> but no effect probably because no explicit application of <code>linkdata</code> on images as datasource</p>
  
  <pre><code>...
  myhandles = guihandles(fp); 
  for image=images
      h = imagesc(image{1}.cdata, 'Parent', imax); 
      myhandles.output = h; 
      myhandles.yData = []; 
      myhandles.xData = []; 
      set(get(myhandles.xData, 'Children'), 'XDataSource', myhandles.xData);  
      set(get(myhandles.yData, 'Children'), 'YDataSource', myhandles.yData);  
      ...
  end
  </code></pre>
  
  <h2>MathWorks' contact</h2>
  
  <p>MATLAB feedback forum answer</p>
  
  <blockquote>
    <p>The short answer is that polaraxes does support data linking, however
    it looks like you are using warp, which is creating a type of surface
    object that does not support data linking.  There are workarounds for
    this, for example you might be able to modify the warp.m file to use
    surf rather than surface.  </p>
  </blockquote>
  
  <p>I am working with the service request about the topic. </p>
  
  <p>MATLAB: 2016b<br>
  OS: Debian 8.5<br>
  MathWorks Service Request: #02229120    </p>