%% Restore Original Heatmap Column Order
% Create a heatmap of utility outages and sort the values in the top row in ascending order by rearranging the columns. Then, restore the original order.

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

%
% Restore the original column order by setting the XDisplayData property of the HeatmapChart object equal to the XData property.

h.XDisplayData = h.XData;

% Copyright 2012 The MathWorks, Inc.