MATLAB: Move x axis labels on a heatmap to the top

heatmap

Is it possible to move the x axis label on a heatmap (the heatmap function introduced in version R2017a) to the top of the heatmap? I have tried the following:
ax = gca;
ax.XAxisLocation = 'top';
but in response the error message is "Unrecognized property 'XAxisLocation' for class 'matlab.graphics.chart.HeatmapChart'."

Best Answer

You can cheat.
axp = struct(ax); %you will get a warning
axp.Axes.XAxisLocation = 'top';
The Axes property is not normally visible, but you can get to it with struct()