function [hFig, hAxis, hLegend, hPatches] = bar_varWidth( colWidth, ...
data, varargin )
parser = inputParser ;
parser.StructExpand = true ;
parser.CaseSensitive = false ;
parser.addRequired( 'colWidth', @isnumeric ) ;
parser.addRequired( 'data', @isnumeric ) ;
parser.addParamValue( 'legend', [], @(x) ischar(x) || iscell(x) ) ;
parser.addParamValue( 'xTickLabel', [], @(x) isnumeric(x) || iscell(x) ) ;
parser.addParamValue( 'xTickLabelFormat', '%.2f', @ischar ) ;
parser.addParamValue( 'xTickLabelShiftThreshold', 10, @isnumeric ) ;
parser.addParamValue( 'xTickLabelAngle', 90, @isnumeric ) ;
parser.addParamValue( 'xTickLabelLineLength', [], @isnumeric ) ;
parser.parse( colWidth, data, varargin{:} ) ;
args = parser.Results ;
Best Answer