3 %>@brief Makes box around gca
using xlim and ylim
6 v_xlim = get(gca, 'xlim');
7 v_ylim = get(gca, 'ylim');
8 % plot(v_xlim([1, 2, 2, 1, 1]), v_ylim([1, 1, 2, 2, 1]), 'LineWidth',
scaled(2), 'Color', [0, 0, 0]);
13 p = [v_xlim(1)+xs*.000001, v_ylim(1)+ys*.000001, xs*.999998, ys*.999998];
17 if isfield(hh, 'boxhandles')
18 idx = find(hh.boxaxes == gca());
20 h = hh.boxhandles(idx);
23 set(h, 'Position', p, 'LineWidth', scaled(2), 'EdgeColor', [0, 0, 0], 'FaceColor', 'none', 'Clipping', 'off');
36 if ~isfield(hh,
'boxhandles')
40 r = rectangle('Position', p, 'LineWidth', scaled(2), 'EdgeColor', [0, 0, 0], 'FaceColor', 'none', 'Clipping', 'off');
41 hh.boxaxes(end+1) = gca();
42 hh.boxhandles(end+1) = r;