%% custom axis
classdef RE_Axis < RE_Box
methods
% CONSTRUCTOR
function obj = RE_Axis(varargin)
hui = axes('units', 'pixels', 'FontSize', 8);
obj = obj@RE_Box(hui);
set(obj, varargin{:});
hcell = get(hui, {'Title', 'YLabel', 'XLabel'});
set([hcell{:}], 'FontWeight', 'bold', 'FontSize', 8, 'Fontname', 'verdana');
end
end % methods
methods (Access = protected)
%% set elements position
function setPosition(obj)
pd = obj.Padding;
ti = get(obj.Handle, 'tightinset');
position = obj.Position(:) + ...
[ti(1); ti(2); -ti(1)-ti(3); -ti(2)-ti(4)] + ...
[pd(1); pd(2); -pd(1)-pd(3); -pd(2)-pd(4)];
position([3,4]) = max(2, position([3,4]));
set( obj.Handle, 'position', position );
end
end
end % classdef