%% Restore Original Heatmap Row Order
% Create a heatmap of utility outages and sort the values in the left column in ascending order (from top to bottom) by rearranging the columns. Then, restore the original order.

T = readtable('outages.csv');
h = heatmap(T,'Region','Cause');
sorty(h)

%
% Restore the original row order by setting the YDisplayData property of the HeatmapChart object equal to the YData property.

h.YDisplayData = h.YData;

% Copyright 2012 The MathWorks, Inc.