def getOptions(): opt = base.ChiggerResult.getOptions() opt.add('location', 'right', "The location of the primary axis.", allow=['left', 'right', 'top', 'bottom']) opt.add('colorbar_origin', None, "The position of the colorbar, relative to the viewport.", vtype=tuple) opt.add('width', 0.05, "The width of the colorbar, relative to window.", vtype=float) opt.add('length', 0.5, "The height of the colorbar, relative to window.", vtype=float) opt += base.ColorMap.getOptions() ax0 = AxisSource.getOptions() ax0.setDefault('ticks_visible', False) ax0.setDefault('axis_visible', False) ax0.pop('color') opt.add('primary', ax0, "The primary axis options.") ax1 = AxisSource.getOptions() ax1.setDefault('axis_visible', False) ax1.setDefault('ticks_visible', False) ax1.setDefault('visible', False) ax1.pop('color') opt.add('secondary', ax1, "The secondary axis options.") return opt
def __init__(self, **kwargs): super(ColorBar, self).__init__(**kwargs) self._sources = [geometric.PlaneSource2D(), AxisSource(), AxisSource()]