1 %> @brief Alters position of figure to make only the legend appear inside inner the figure area
3 %> @ingroup graphicsapi
5 %> This pretty much inutilizes the figure
for other purpose than saving the legend
as an image.
13 psavel = get(hl, 'Position');
15 set(gca, 'position', [2.1, 0, 1.1, 0.1]); % Axis out of sight
17 set(hl, 'Position', [0, 0, psavel(3), psavel(4)]); % Moves legend maintaining position
18 set(hl, 'Units', 'pixels'); % Changes unit of legend handle in order to transfer position information from the legend to the figure
19 p = get(hl, 'Position');
20 set(hl, 'Position', [p(1)+SCALE+1, p(2)+SCALE+1, p(3), p(4)]); % Shifts a bit so that the whole border is visible
21 set(gcf, 'Position', [0, 0, p(3)+
scaled(3), p(4)+scaled(3)]);
function show_legend_only()
Analysis Session (AS) base class.
function save_legend(in fn, in dpi)