Stuff during JLT writing...
This commit is contained in:
@@ -49,22 +49,5 @@ classdef clr
|
||||
hold off;
|
||||
end
|
||||
|
||||
function showSet(colorStruct)
|
||||
% Show colors from a structure in a bar plot
|
||||
names = fieldnames(colorStruct);
|
||||
colors = cell2mat(struct2cell(colorStruct)');
|
||||
|
||||
figure;
|
||||
hold on;
|
||||
for i = 1:size(colors, 1)
|
||||
fill([0 1 1 0], [i-1 i-1 i i], colors(i, :), 'EdgeColor', 'k');
|
||||
text(1.1, i-0.5, names{i}, 'FontSize', 12, 'Interpreter', 'none');
|
||||
end
|
||||
ylim([0, size(colors, 1)]);
|
||||
xlim([0, 1.5]);
|
||||
axis off;
|
||||
title('Color Preview');
|
||||
hold off;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user