def addSettings(klass, s): """Construct list of settings.""" GenericPlotter.addSettings(s) # get rid of default key setting s.remove('key') s.add( setting.Strings('keys', ('',), descr=_('Key text for each dataset'), usertext=_('Key text')), 0) s.add( setting.DatasetOrStr('labels', '', descr=_('Dataset or string to label bars'), usertext=_('Labels'), datatype='text'), 5 ) s.add( setting.Choice('mode', ('grouped', 'stacked', 'stacked-area'), 'grouped', descr=_('Show datasets grouped ' 'together or as a single bar'), usertext=_('Mode')), 0) s.add( setting.Choice('direction', ('horizontal', 'vertical'), 'vertical', descr = _('Horizontal or vertical bar chart'), usertext=_('Direction')), 0 ) s.add( setting.Dataset('posn', '', descr = _('Dataset containing position of bars' ' (optional)'), usertext=_('Positions')), 0 ) s.add( setting.Datasets('lengths', ('y',), descr = _('Datasets containing lengths of bars'), usertext=_('Lengths')), 0 ) s.add( setting.Float('barfill', 0.75, minval = 0., maxval = 1., descr = _('Filling fraction of bars' ' (between 0 and 1)'), usertext=_('Bar fill'), formatting=True) ) s.add( setting.Float('groupfill', 0.9, minval = 0., maxval = 1., descr = _('Filling fraction of groups of bars' ' (between 0 and 1)'), usertext=_('Group fill'), formatting=True) ) s.add( setting.Choice('errorstyle', ('none', 'bar', 'barends'), 'bar', descr=_('Error bar style to show'), usertext=_('Error style'), formatting=True) ) s.add(BarFill('BarFill', descr=_('Bar fill'), usertext=_('Fill')), pixmap = 'settings_bgfill') s.add(BarLine('BarLine', descr=_('Bar line'), usertext=_('Line')), pixmap = 'settings_border') s.add( setting.ErrorBarLine('ErrorBarLine', descr = _('Error bar line settings'), usertext = _('Error bar line')), pixmap = 'settings_ploterrorline' )
def addSettings(klass, s): """Construct list of settings.""" GenericPlotter.addSettings(s) s.add( setting.Int('steps', 50, minval=3, descr=_('Number of steps to evaluate the function' ' over'), usertext=_('Steps'), formatting=True), 0) s.add( setting.Choice('variable', ['x', 'y'], 'x', descr=_('Variable the function is a function of'), usertext=_('Variable')), 0) s.add( setting.Str('function', 'x', descr=_('Function expression'), usertext=_('Function')), 0) s.add( setting.FloatOrAuto( 'min', 'Auto', descr=_('Minimum value at which to plot function'), usertext=_('Min'))) s.add( setting.FloatOrAuto( 'max', 'Auto', descr=_('Maximum value at which to plot function'), usertext=_('Max'))) s.add(setting.Line('Line', descr=_('Function line settings'), usertext=_('Plot line')), pixmap='settings_plotline') s.add(setting.PlotterFill('FillBelow', descr=_('Fill below function'), usertext=_('Fill below')), pixmap='settings_plotfillbelow') s.add(setting.PlotterFill('FillAbove', descr=_('Fill above function'), usertext=_('Fill above')), pixmap='settings_plotfillabove')
def addSettings(klass, s): """Construct list of settings.""" GenericPlotter.addSettings(s) s.add( setting.Int('steps', 50, minval = 3, descr = _('Number of steps to evaluate the function' ' over'), usertext=_('Steps'), formatting=True), 0 ) s.add( setting.Choice('variable', ['x', 'y'], 'x', descr=_('Variable the function is a function of'), usertext=_('Variable')), 0 ) s.add( setting.Str('function', 'x', descr=_('Function expression'), usertext=_('Function')), 0 ) s.add(setting.FloatOrAuto('min', 'Auto', descr=_('Minimum value at which to plot function'), usertext=_('Min'))) s.add(setting.FloatOrAuto('max', 'Auto', descr=_('Maximum value at which to plot function'), usertext=_('Max'))) s.add( setting.Line('Line', descr = _('Function line settings'), usertext = _('Plot line')), pixmap = 'settings_plotline' ) s.add( setting.PlotterFill('FillBelow', descr = _('Fill below function'), usertext = _('Fill below')), pixmap = 'settings_plotfillbelow' ) s.add( setting.PlotterFill('FillAbove', descr = _('Fill above function'), usertext = _('Fill above')), pixmap = 'settings_plotfillabove' )
def addSettings(klass, s): """Construct list of settings.""" GenericPlotter.addSettings(s) s.remove('key') s.add( setting.Choice('whiskermode', ('min/max', '1.5IQR', '1 stddev', '9/91 percentile', '2/98 percentile'), '1.5IQR', descr = _('Whisker mode'), usertext=_('Whisker mode')), 0 ) s.add( setting.Choice('direction', ('horizontal', 'vertical'), 'vertical', descr = _('Horizontal or vertical boxes'), usertext=_('Direction')), 0 ) s.add( setting.DatasetOrStr('labels', '', descr=_('Dataset or string to label bars'), usertext=_('Labels'), datatype='text'), 0 ) s.add( setting.DatasetOrFloatList( 'posn', '', descr = _('Dataset or list of values giving ' 'positions of boxes (optional)'), usertext=_('Positions')), 0 ) # calculate statistics from these datasets s.add( setting.Datasets('values', ('data',), descr = _('Datasets containing values to ' 'calculate statistics for'), usertext=_('Datasets')), 0 ) # alternate mode where data are provided for boxes s.add( setting.DatasetOrFloatList( 'whiskermax', '', descr=_('Dataset with whisker maxima or list of values'), usertext=_('Whisker max')), 0 ) s.add( setting.DatasetOrFloatList( 'whiskermin', '', descr=_('Dataset with whisker minima or list of values'), usertext=_('Whisker min')), 0 ) s.add( setting.DatasetOrFloatList( 'boxmax', '', descr=_('Dataset with box maxima or list of values'), usertext=_('Box max')), 0 ) s.add( setting.DatasetOrFloatList( 'boxmin', '', descr=_('Dataset with box minima or list of values'), usertext=_('Box min')), 0 ) s.add( setting.DatasetOrFloatList( 'median', '', descr=_('Dataset with medians or list of values'), usertext=_('Median')), 0 ) s.add( setting.DatasetOrFloatList( 'mean', '', descr=_('Dataset with means or list of values'), usertext=_('Mean')), 0 ) # switch between different modes s.add( setting.BoolSwitch('calculate', True, descr = _('Calculate statistics from datasets' ' rather than given manually'), usertext = _('Calculate'), settingstrue=('whiskermode', 'values'), settingsfalse=('boxmin', 'whiskermin', 'boxmax', 'whiskermax', 'mean', 'median')), 0 ) # formatting options s.add( setting.Float('fillfraction', 0.75, descr = _('Fill fraction of boxes'), usertext=_('Fill fraction'), formatting=True) ) s.add( setting.Marker('outliersmarker', 'circle', descr = _('Marker for outliers'), usertext=_('Outliers'), formatting=True) ) s.add( setting.Marker('meanmarker', 'linecross', descr = _('Marker for mean'), usertext=_('Mean'), formatting=True) ) s.add( setting.DistancePt('markerSize', '3pt', descr = _('Size of markers to plot'), usertext=_('Markers size'), formatting=True) ) s.add( setting.GraphBrush( 'Fill', descr = _('Box fill'), usertext=_('Box fill')), pixmap='settings_bgfill' ) s.add( setting.Line('Border', descr = _('Box border line'), usertext=_('Box border')), pixmap='settings_border') s.add( setting.Line('Whisker', descr = _('Whisker line'), usertext=_('Whisker line')), pixmap='settings_whisker') s.add( setting.Line('MarkersLine', descr = _('Line around markers'), usertext = _('Markers border')), pixmap = 'settings_plotmarkerline' ) s.add( setting.BoxPlotMarkerFillBrush('MarkersFill', descr = _('Markers fill'), usertext = _('Markers fill')), pixmap = 'settings_plotmarkerfill' )
def addSettings(klass, s): """Construct list of settings.""" GenericPlotter.addSettings(s) s.remove("key") s.add( setting.Choice( "whiskermode", ("min/max", "1.5IQR", "1 stddev", "9/91 percentile", "2/98 percentile"), "1.5IQR", descr="Whisker mode", usertext="Whisker mode", ), 0, ) s.add( setting.Choice( "direction", ("horizontal", "vertical"), "vertical", descr="Horizontal or vertical boxes", usertext="Direction", ), 0, ) s.add( setting.DatasetOrStr( "labels", "", descr="Dataset or string to label bars", usertext="Labels", datatype="text" ), 0, ) s.add( setting.DatasetOrFloatList( "posn", "", descr="Dataset or list of values giving " "positions of boxes (optional)", usertext="Positions", ), 0, ) # calculate statistics from these datasets s.add( setting.Datasets( "values", ("data",), descr="Datasets containing values to " "calculate statistics for", usertext="Datasets", ), 0, ) # alternate mode where data are provided for boxes s.add( setting.DatasetOrFloatList( "whiskermax", "", descr="Dataset with whisker maxima or list of values", usertext="Whisker max" ), 0, ) s.add( setting.DatasetOrFloatList( "whiskermin", "", descr="Dataset with whisker minima or list of values", usertext="Whisker min" ), 0, ) s.add( setting.DatasetOrFloatList( "boxmax", "", descr="Dataset with box maxima or list of values", usertext="Box max" ), 0, ) s.add( setting.DatasetOrFloatList( "boxmin", "", descr="Dataset with box minima or list of values", usertext="Box min" ), 0, ) s.add( setting.DatasetOrFloatList("median", "", descr="Dataset with medians or list of values", usertext="Median"), 0, ) s.add(setting.DatasetOrFloatList("mean", "", descr="Dataset with means or list of values", usertext="Mean"), 0) # switch between different modes s.add( setting.BoolSwitch( "calculate", True, descr="Calculate statistics from datasets" " rather than given manually", usertext="Calculate", settingstrue=("whiskermode", "values"), settingsfalse=("boxmin", "whiskermin", "boxmax", "whiskermax", "mean", "median"), ), 0, ) # formatting options s.add( setting.Float( "fillfraction", 0.75, descr="Fill fraction of boxes", usertext="Fill fraction", formatting=True ) ) s.add( setting.Marker( "outliersmarker", "circle", descr="Marker for outliers", usertext="Outliers", formatting=True ) ) s.add(setting.Marker("meanmarker", "linecross", descr="Marker for mean", usertext="Mean", formatting=True)) s.add( setting.DistancePt( "markerSize", "3pt", descr="Size of markers to plot", usertext="Markers size", formatting=True ) ) s.add(setting.GraphBrush("Fill", descr="Box fill", usertext="Box fill"), pixmap="settings_bgfill") s.add(setting.Line("Border", descr="Box border line", usertext="Box border"), pixmap="settings_border") s.add(setting.Line("Whisker", descr="Whisker line", usertext="Whisker line"), pixmap="settings_whisker") s.add( setting.Line("MarkersLine", descr="Line around markers", usertext="Markers border"), pixmap="settings_plotmarkerline", ) s.add( setting.GraphBrush("MarkersFill", descr="Markers fill", usertext="Markers fill"), pixmap="settings_plotmarkerfill", )
def addSettings(klass, s): """Construct list of settings.""" GenericPlotter.addSettings(s) s.add( setting.Int( "thinfactor", 1, minval=1, descr="Thin number of markers plotted" " for each datapoint by this factor", usertext="Thin markers", formatting=True, ), 0, ) s.add( setting.DistancePt( "markerSize", "3pt", descr="Size of marker to plot", usertext="Marker size", formatting=True ), 0, ) s.add(setting.Marker("marker", "circle", descr="Type of marker to plot", usertext="Marker", formatting=True), 0) s.add( setting.DatasetOrStr( "labels", "", descr="Dataset or string to label points", usertext="Labels", datatype="text" ), 5, ) s.add( setting.DatasetOrFloatList( "scalePoints", "", descr="Scale size of plotted markers by this dataset or" " list of values", usertext="Scale markers", ), 6, ) s.add( setting.DatasetOrFloatList( "yData", "y", descr="Dataset containing y data or list of values", usertext="Y data" ), 0, ) s.add( setting.DatasetOrFloatList( "xData", "x", descr="Dataset containing x data or list of values", usertext="X data" ), 0, ) s.add( setting.ErrorStyle( "errorStyle", "bar", descr="Style of error bars to plot", usertext="Error style", formatting=True ) ) s.add( setting.XYPlotLine("PlotLine", descr="Plot line settings", usertext="Plot line"), pixmap="settings_plotline" ) s.add( setting.Line("MarkerLine", descr="Line around the marker settings", usertext="Marker border"), pixmap="settings_plotmarkerline", ) s.add( MarkerFillBrush("MarkerFill", descr="Marker fill settings", usertext="Marker fill"), pixmap="settings_plotmarkerfill", ) s.add( setting.ErrorBarLine("ErrorBarLine", descr="Error bar line settings", usertext="Error bar line"), pixmap="settings_ploterrorline", ) s.add( setting.PointFill("FillBelow", descr="Fill below plot line", usertext="Fill below"), pixmap="settings_plotfillbelow", ) s.add( setting.PointFill("FillAbove", descr="Fill above plot line", usertext="Fill above"), pixmap="settings_plotfillabove", ) s.add(setting.PointLabel("Label", descr="Label settings", usertext="Label"), pixmap="settings_axislabel")
def addSettings(klass, s): """Construct list of settings.""" GenericPlotter.addSettings(s) s.add( setting.Int('thinfactor', 1, minval=1, descr=_('Thin number of markers plotted' ' for each datapoint by this factor'), usertext=_('Thin markers'), formatting=True), 0) s.add( setting.DistancePt('markerSize', '3pt', descr=_('Size of marker to plot'), usertext=_('Marker size'), formatting=True), 0) s.add( setting.Marker('marker', 'circle', descr=_('Type of marker to plot'), usertext=_('Marker'), formatting=True), 0) s.add( setting.DatasetOrStr('labels', '', descr=_('Dataset or string to label points'), usertext=_('Labels'), datatype='text'), 5) s.add( setting.DatasetOrFloatList( 'scalePoints', '', descr=_('Scale size of plotted markers by this dataset or' ' list of values'), usertext=_('Scale markers')), 6) s.add(ColorSettings('Color')) s.add( setting.DatasetOrFloatList( 'yData', 'y', descr=_('Dataset containing y data or list of values'), usertext=_('Y data')), 0) s.add( setting.DatasetOrFloatList( 'xData', 'x', descr=_('Dataset containing x data or list of values'), usertext=_('X data')), 0) s.add( setting.ErrorStyle('errorStyle', 'bar', descr=_('Style of error bars to plot'), usertext=_('Error style'), formatting=True)) s.add(setting.XYPlotLine('PlotLine', descr=_('Plot line settings'), usertext=_('Plot line')), pixmap='settings_plotline') s.add(setting.Line('MarkerLine', descr=_('Line around the marker settings'), usertext=_('Marker border')), pixmap='settings_plotmarkerline') s.add(MarkerFillBrush('MarkerFill', descr=_('Marker fill settings'), usertext=_('Marker fill')), pixmap='settings_plotmarkerfill') s.add(setting.ErrorBarLine('ErrorBarLine', descr=_('Error bar line settings'), usertext=_('Error bar line')), pixmap='settings_ploterrorline') s.add(setting.PointFill('FillBelow', descr=_('Fill below plot line'), usertext=_('Fill below')), pixmap='settings_plotfillbelow') s.add(setting.PointFill('FillAbove', descr=_('Fill above plot line'), usertext=_('Fill above')), pixmap='settings_plotfillabove') s.add(setting.PointLabel('Label', descr=_('Label settings'), usertext=_('Label')), pixmap='settings_axislabel')
def addSettings(klass, s): """Construct list of settings.""" GenericPlotter.addSettings(s) s.add( setting.Int('thinfactor', 1, minval=1, descr=_('Thin number of markers plotted' ' for each datapoint by this factor'), usertext=_('Thin markers'), formatting=True), 0 ) s.add( setting.DistancePt('markerSize', '3pt', descr = _('Size of marker to plot'), usertext=_('Marker size'), formatting=True), 0 ) s.add( setting.Marker('marker', 'circle', descr = _('Type of marker to plot'), usertext=_('Marker'), formatting=True), 0 ) s.add( setting.DatasetOrStr('labels', '', descr=_('Dataset or string to label points'), usertext=_('Labels'), datatype='text'), 5 ) s.add( setting.DatasetOrFloatList( 'scalePoints', '', descr = _('Scale size of plotted markers by this dataset or' ' list of values'), usertext=_('Scale markers')), 6 ) s.add( ColorSettings('Color') ) s.add( setting.DatasetOrFloatList( 'yData', 'y', descr=_('Dataset containing y data or list of values'), usertext=_('Y data')), 0 ) s.add( setting.DatasetOrFloatList( 'xData', 'x', descr=_('Dataset containing x data or list of values'), usertext=_('X data')), 0 ) s.add( setting.ErrorStyle('errorStyle', 'bar', descr=_('Style of error bars to plot'), usertext=_('Error style'), formatting=True) ) s.add( setting.XYPlotLine('PlotLine', descr = _('Plot line settings'), usertext = _('Plot line')), pixmap = 'settings_plotline' ) s.add( setting.Line('MarkerLine', descr = _('Line around the marker settings'), usertext = _('Marker border')), pixmap = 'settings_plotmarkerline' ) s.add( MarkerFillBrush('MarkerFill', descr = _('Marker fill settings'), usertext = _('Marker fill')), pixmap = 'settings_plotmarkerfill' ) s.add( setting.ErrorBarLine('ErrorBarLine', descr = _('Error bar line settings'), usertext = _('Error bar line')), pixmap = 'settings_ploterrorline' ) s.add( setting.PointFill('FillBelow', descr = _('Fill below plot line'), usertext = _('Fill below')), pixmap = 'settings_plotfillbelow' ) s.add( setting.PointFill('FillAbove', descr = _('Fill above plot line'), usertext = _('Fill above')), pixmap = 'settings_plotfillabove' ) s.add( setting.PointLabel('Label', descr = _('Label settings'), usertext=_('Label')), pixmap = 'settings_axislabel' )
def addSettings(klass, s): """Construct list of settings.""" GenericPlotter.addSettings(s) s.add( setting.Int('thinfactor', 1, minval=1, descr=_('Thin number of markers plotted' ' for each datapoint by this factor'), usertext=_('Thin markers'), formatting=True), 0 ) s.add( setting.DistancePt('markerSize', '3pt', descr = _('Size of marker to plot'), usertext=_('Marker size'), formatting=True), 0 ) s.add( setting.Marker('marker', 'circle', descr = _('Type of marker to plot'), usertext=_('Marker'), formatting=True), 0 ) s.add( setting.DatasetOrStr('labels', '', descr=_('Dataset or string to label points'), usertext=_('Labels'), datatype='text'), 5 ) s.add( setting.DatasetOrFloatList( 'scalePoints', '', descr = _('Scale size of plotted markers by this dataset or' ' list of values'), usertext=_('Scale markers')), 6 ) s.add( ColorSettings('Color') ) s.add( setting.DatasetOrFloatList( 'yData', 'y', descr=_('Dataset containing y data or list of values'), usertext=_('Y data')), 0 ) s.add( setting.DatasetOrFloatList( 'xData', 'x', descr=_('Dataset containing x data or list of values'), usertext=_('X data')), 0 ) s.add( setting.ErrorStyle('errorStyle', 'bar', descr=_('Style of error bars to plot'), usertext=_('Error style'), formatting=True) ) s.add( setting.XYPlotLine('PlotLine', descr = _('Plot line settings'), usertext = _('Plot line')), pixmap = 'settings_plotline' ) s.add( setting.Line('MarkerLine', descr = _('Line around the marker settings'), usertext = _('Marker border')), pixmap = 'settings_plotmarkerline' ) s.add( MarkerFillBrush('MarkerFill', descr = _('Marker fill settings'), usertext = _('Marker fill')), pixmap = 'settings_plotmarkerfill' ) s.add( setting.ErrorBarLine('ErrorBarLine', descr = _('Error bar line settings'), usertext = _('Error bar line')), pixmap = 'settings_ploterrorline' ) # XXX FillBelow and FillAbove are historical names. The two settings # are now more akin to Fill1 and Fill2 in widgets.nonorthpoint but the # names are allowed to persist for backward compatibility (there's no # equivalent to SettingBackwardCompat for Settings derived classes) s.add( PointFillBelow('FillBelow', descr = _('Fill settings (1)'), usertext = _('Area fill 1')), pixmap = 'settings_plotfillbelow' ) s.add( PointFillAbove('FillAbove', descr = _('Fill settings (2)'), usertext = _('Area fill 2')), pixmap = 'settings_plotfillbelow' ) s.add( setting.PointLabel('Label', descr = _('Label settings'), usertext=_('Label')), pixmap = 'settings_axislabel' )
def addSettings(klass, s): """Construct list of settings.""" GenericPlotter.addSettings(s) # get rid of default key setting s.remove('key') s.add( setting.Strings('keys', ('', ), descr=_('Key text for each dataset'), usertext=_('Key text')), 0) s.add( setting.DatasetOrStr('labels', '', descr=_('Dataset or string to label bars'), usertext=_('Labels'), datatype='text'), 5) s.add( setting.Choice('mode', ('grouped', 'stacked', 'stacked-area'), 'grouped', descr=_('Show datasets grouped ' 'together or as a single bar'), usertext=_('Mode')), 0) s.add( setting.Choice('direction', ('horizontal', 'vertical'), 'vertical', descr=_('Horizontal or vertical bar chart'), usertext=_('Direction')), 0) s.add( setting.Dataset('posn', '', descr=_('Dataset containing position of bars' ' (optional)'), usertext=_('Positions')), 0) s.add( setting.Datasets('lengths', ('y', ), descr=_('Datasets containing lengths of bars'), usertext=_('Lengths')), 0) s.add( setting.Float('barfill', 0.75, minval=0., maxval=1., descr=_('Filling fraction of bars' ' (between 0 and 1)'), usertext=_('Bar fill'), formatting=True)) s.add( setting.Float('groupfill', 0.9, minval=0., maxval=1., descr=_('Filling fraction of groups of bars' ' (between 0 and 1)'), usertext=_('Group fill'), formatting=True)) s.add( setting.Choice('errorstyle', ('none', 'bar', 'barends'), 'bar', descr=_('Error bar style to show'), usertext=_('Error style'), formatting=True)) s.add(BarFill('BarFill', descr=_('Bar fill'), usertext=_('Fill')), pixmap='settings_bgfill') s.add(BarLine('BarLine', descr=_('Bar line'), usertext=_('Line')), pixmap='settings_border') s.add(setting.ErrorBarLine('ErrorBarLine', descr=_('Error bar line settings'), usertext=_('Error bar line')), pixmap='settings_ploterrorline')
def addSettings(klass, s): """Construct list of settings.""" GenericPlotter.addSettings(s) # get rid of default key setting s.remove("key") s.add(setting.Strings("keys", ("",), descr="Key text for each dataset", usertext="Key text"), 0) s.add( setting.DatasetOrStr( "labels", "", descr="Dataset or string to label bars", usertext="Labels", datatype="text" ), 5, ) s.add( setting.Choice( "mode", ("grouped", "stacked"), "grouped", descr="Show datasets grouped " "together or as a single bar", usertext="Mode", ), 0, ) s.add( setting.Choice( "direction", ("horizontal", "vertical"), "vertical", descr="Horizontal or vertical bar chart", usertext="Direction", ), 0, ) s.add( setting.Dataset( "posn", "", descr="Dataset containing position of bars" " (optional)", usertext="Positions" ), 0, ) s.add(setting.Datasets("lengths", ("y",), descr="Datasets containing lengths of bars", usertext="Lengths"), 0) s.add( setting.Float( "barfill", 0.75, minval=0.0, maxval=1.0, descr="Filling fraction of bars" " (between 0 and 1)", usertext="Bar fill", formatting=True, ) ) s.add( setting.Float( "groupfill", 0.9, minval=0.0, maxval=1.0, descr="Filling fraction of groups of bars" " (between 0 and 1)", usertext="Group fill", formatting=True, ) ) s.add( setting.Choice( "errorstyle", ("none", "bar", "barends"), "bar", descr="Error bar style to show", usertext="Error style", formatting=True, ) ) s.add(BarFill("BarFill", descr="Bar fill", usertext="Fill"), pixmap="settings_bgfill") s.add(BarLine("BarLine", descr="Bar line", usertext="Line"), pixmap="settings_border") s.add( setting.ErrorBarLine("ErrorBarLine", descr="Error bar line settings", usertext="Error bar line"), pixmap="settings_ploterrorline", )
def addSettings(klass, s): """Construct list of settings.""" GenericPlotter.addSettings(s) s.remove('key') s.add( setting.Choice('whiskermode', ('min/max', '1.5IQR', '1 stddev', '9/91 percentile', '2/98 percentile'), '1.5IQR', descr=_('Whisker mode'), usertext=_('Whisker mode')), 0) s.add( setting.Choice('direction', ('horizontal', 'vertical'), 'vertical', descr=_('Horizontal or vertical boxes'), usertext=_('Direction')), 0) s.add( setting.DatasetOrStr('labels', '', descr=_('Dataset or string to label bars'), usertext=_('Labels'), datatype='text'), 0) s.add( setting.DatasetOrFloatList('posn', '', descr=_( 'Dataset or list of values giving ' 'positions of boxes (optional)'), usertext=_('Positions')), 0) # calculate statistics from these datasets s.add( setting.Datasets('values', ('data', ), descr=_('Datasets containing values to ' 'calculate statistics for'), usertext=_('Datasets')), 0) # alternate mode where data are provided for boxes s.add( setting.DatasetOrFloatList( 'whiskermax', '', descr=_('Dataset with whisker maxima or list of values'), usertext=_('Whisker max')), 0) s.add( setting.DatasetOrFloatList( 'whiskermin', '', descr=_('Dataset with whisker minima or list of values'), usertext=_('Whisker min')), 0) s.add( setting.DatasetOrFloatList( 'boxmax', '', descr=_('Dataset with box maxima or list of values'), usertext=_('Box max')), 0) s.add( setting.DatasetOrFloatList( 'boxmin', '', descr=_('Dataset with box minima or list of values'), usertext=_('Box min')), 0) s.add( setting.DatasetOrFloatList( 'median', '', descr=_('Dataset with medians or list of values'), usertext=_('Median')), 0) s.add( setting.DatasetOrFloatList( 'mean', '', descr=_('Dataset with means or list of values'), usertext=_('Mean')), 0) # switch between different modes s.add( setting.BoolSwitch('calculate', True, descr=_('Calculate statistics from datasets' ' rather than given manually'), usertext=_('Calculate'), settingstrue=('whiskermode', 'values'), settingsfalse=('boxmin', 'whiskermin', 'boxmax', 'whiskermax', 'mean', 'median')), 0) # formatting options s.add( setting.Float('fillfraction', 0.75, descr=_('Fill fraction of boxes'), usertext=_('Fill fraction'), formatting=True)) s.add( setting.Marker('outliersmarker', 'circle', descr=_('Marker for outliers'), usertext=_('Outliers'), formatting=True)) s.add( setting.Marker('meanmarker', 'linecross', descr=_('Marker for mean'), usertext=_('Mean'), formatting=True)) s.add( setting.DistancePt('markerSize', '3pt', descr=_('Size of markers to plot'), usertext=_('Markers size'), formatting=True)) s.add(setting.GraphBrush('Fill', descr=_('Box fill'), usertext=_('Box fill')), pixmap='settings_bgfill') s.add(setting.Line('Border', descr=_('Box border line'), usertext=_('Box border')), pixmap='settings_border') s.add(setting.Line('Whisker', descr=_('Whisker line'), usertext=_('Whisker line')), pixmap='settings_whisker') s.add(setting.Line('MarkersLine', descr=_('Line around markers'), usertext=_('Markers border')), pixmap='settings_plotmarkerline') s.add(setting.BoxPlotMarkerFillBrush('MarkersFill', descr=_('Markers fill'), usertext=_('Markers fill')), pixmap='settings_plotmarkerfill')