def __init__(self, data, ax, prefs, *args, **kw): PlotBase.__init__(self, data, ax, prefs, *args, **kw) if type(data) == types.DictType: self.gdata = GraphData(data) elif type(data) == types.InstanceType and data.__class__ == GraphData: self.gdata = data if self.prefs.has_key('span'): self.width = self.prefs['span'] else: self.width = 1.0 if self.gdata.key_type == "time": nKeys = self.gdata.getNumberOfKeys() self.width = (max(self.gdata.all_keys) - min(self.gdata.all_keys)) / nKeys # Setup the colormapper to get the right colors self.cmap = None max_value = prefs.get('normalization') if max_value: self.cmap = cm.YlGnBu else: max_value = 100 self.cmap = cm.RdYlGn self.norms = Normalize(0, max_value) mapper = cm.ScalarMappable(cmap=self.cmap, norm=self.norms) def get_alpha(*args, **kw): return 1.0 mapper.get_alpha = get_alpha self.mapper = mapper
def __init__(self, data, ax, prefs, *args, **kw): PlotBase.__init__(self, data, ax, prefs, *args, **kw) if type(data) == types.DictType: self.gdata = GraphData(data) elif type(data) == types.InstanceType and data.__class__ == GraphData: self.gdata = data if self.prefs.has_key('span'): self.width = self.prefs['span'] else: self.width = 1.0 if self.gdata.key_type == "time": nKeys = self.gdata.getNumberOfKeys() self.width = (max(self.gdata.all_keys) - min(self.gdata.all_keys)) / nKeys # Setup the colormapper to get the right colors self.cmap = LinearSegmentedColormap('quality_colormap', cdict, 256) #self.cmap = cm.RdYlGn self.norms = normalize(0, 100) mapper = cm.ScalarMappable(cmap=self.cmap, norm=self.norms) mapper = cm.ScalarMappable(cmap=cm.RdYlGn, norm=self.norms) def get_alpha(*args, **kw): return 1.0 mapper.get_alpha = get_alpha self.mapper = mapper
def __init__( self, data, ax, prefs, *args, **kw ): PlotBase.__init__( self, data, ax, prefs, *args, **kw ) if type( data ) == types.DictType: self.gdata = GraphData( data ) elif type( data ) == types.InstanceType and data.__class__ == GraphData: self.gdata = data if self.prefs.has_key( 'span' ): self.width = self.prefs['span'] else: self.width = 1.0 if self.gdata.key_type == "time": nKeys = self.gdata.getNumberOfKeys() self.width = ( max( self.gdata.all_keys ) - min( self.gdata.all_keys ) ) / nKeys # Setup the colormapper to get the right colors self.cmap = LinearSegmentedColormap( 'quality_colormap', cdict, 256 ) #self.cmap = cm.RdYlGn self.norms = normalize( 0, 100 ) mapper = cm.ScalarMappable( cmap = self.cmap, norm = self.norms ) mapper = cm.ScalarMappable( cmap = cm.RdYlGn, norm = self.norms ) def get_alpha( *args, **kw ): return 1.0 mapper.get_alpha = get_alpha self.mapper = mapper
def __init__(self, data, ax, prefs, *args, **kw): PlotBase.__init__(self, data, ax, prefs, *args, **kw) if type(data) == types.DictType: self.gdata = GraphData(data) elif type(data) == types.InstanceType and data.__class__ == GraphData: self.gdata = data if self.prefs.has_key("span"): self.width = self.prefs["span"] else: self.width = 1.0 if self.gdata.key_type == "time": nKeys = self.gdata.getNumberOfKeys() self.width = (max(self.gdata.all_keys) - min(self.gdata.all_keys)) / nKeys # Setup the colormapper to get the right colors self.cmap = None max_value = prefs.get("normalization") if max_value: self.cmap = cm.YlGnBu else: max_value = 100 self.cmap = cm.RdYlGn self.norms = Normalize(0, max_value) mapper = cm.ScalarMappable(cmap=self.cmap, norm=self.norms) def get_alpha(*args, **kw): return 1.0 mapper.get_alpha = get_alpha self.mapper = mapper
def __init__( self, data, ax, prefs, *args, **kw ): PlotBase.__init__( self, data, ax, prefs, *args, **kw ) if isinstance( data, dict ): self.gdata = GraphData( data ) elif isinstance( data, type ) and data.__class__ == GraphData: self.gdata = data if self.prefs.has_key( 'span' ): self.width = self.prefs['span'] else: self.width = 1.0 if self.gdata.key_type == "time": nKeys = self.gdata.getNumberOfKeys() self.width = ( max( self.gdata.all_keys ) - min( self.gdata.all_keys ) ) / nKeys # Setup the colormapper to get the right colors self.cmap = None max_value = prefs.get( 'normalization' ) if max_value: self.cmap = cm.YlGnBu #pylint: disable=no-member else: max_value = 100 self.cmap = cm.RdYlGn #pylint: disable=no-member self.norms = Normalize( 0, max_value ) mapper = cm.ScalarMappable( cmap = self.cmap, norm = self.norms ) def get_alpha( *args, **kw ): return 1.0 mapper.get_alpha = get_alpha self.mapper = mapper
def __init__(self,data,ax,prefs,*args,**kw): PlotBase.__init__(self,data,ax,prefs,*args,**kw) if self.prefs.has_key('span'): self.width = self.prefs['span'] else: self.width = 1.0 if self.gdata.key_type == "time": # Try to guess the time bin span nKeys = self.gdata.getNumberOfKeys() self.width = (max(self.gdata.all_keys)-min(self.gdata.all_keys))/(nKeys-1)
def __init__(self, data, ax, prefs, *args, **kw): PlotBase.__init__(self, data, ax, prefs, *args, **kw) if 'span' in self.prefs: self.width = self.prefs['span'] else: self.width = 1.0 if self.gdata.key_type == "time": # Try to guess the time bin span nKeys = self.gdata.getNumberOfKeys() self.width = (max(self.gdata.all_keys) - min(self.gdata.all_keys)) / (nKeys - 1)
def __init__(self, data, ax, prefs, *args, **kw): PlotBase.__init__(self, data, ax, prefs, *args, **kw) if isinstance(data, dict): self.gdata = GraphData(data) elif isinstance(data, type) and data.__class__ == GraphData: self.gdata = data if "span" in self.prefs: self.width = self.prefs["span"] else: self.width = 1.0 if self.gdata.key_type == "time": nKeys = self.gdata.getNumberOfKeys() self.width = (max(self.gdata.all_keys) - min(self.gdata.all_keys)) / nKeys # redefine the look of the scale if requested if isinstance(self.prefs["scale_data"], dict): self.cbBoundaries = list() self.cbValues = list() # ColorbarBase needs sorted data for boundary in sorted(self.prefs["scale_data"]): self.cbBoundaries.append(boundary) self.cbValues.append(self.prefs["scale_data"][boundary]) else: self.cbBoundaries = None # set default values self.cbValues = None if isinstance(self.prefs["scale_ticks"], list): self.cbTicks = self.prefs["scale_ticks"] else: self.cbTicks = None # set default value # Setup the colormapper to get the right colors self.cmap = None max_value = prefs.get("normalization") if max_value: self.cmap = cm.YlGnBu # pylint: disable=no-member else: max_value = 100 self.cmap = cm.RdYlGn # pylint: disable=no-member self.norms = Normalize(0, max_value) mapper = cm.ScalarMappable(cmap=self.cmap, norm=self.norms) def get_alpha(*args, **kw): return 1.0 mapper.get_alpha = get_alpha self.mapper = mapper
def __init__( self, data, ax, prefs, *args, **kw ): PlotBase.__init__( self, data, ax, prefs, *args, **kw ) if isinstance( data, dict ): self.gdata = GraphData( data ) elif isinstance( data, type ) and data.__class__ == GraphData: self.gdata = data if self.prefs.has_key( 'span' ): self.width = self.prefs['span'] else: self.width = 1.0 if self.gdata.key_type == "time": nKeys = self.gdata.getNumberOfKeys() self.width = ( max( self.gdata.all_keys ) - min( self.gdata.all_keys ) ) / nKeys # redefine the look of the scale if requested if isinstance(self.prefs['scale_data'], dict): self.cbBoundaries = list() self.cbValues = list() # ColorbarBase needs sorted data for boundary in sorted(self.prefs['scale_data'].keys()): self.cbBoundaries.append(boundary) self.cbValues.append(self.prefs['scale_data'][boundary]) else: self.cbBoundaries = None # set default values self.cbValues = None if isinstance(self.prefs['scale_ticks'], list): self.cbTicks = self.prefs['scale_ticks'] else: self.cbTicks = None # set default value # Setup the colormapper to get the right colors self.cmap = None max_value = prefs.get( 'normalization' ) if max_value: self.cmap = cm.YlGnBu #pylint: disable=no-member else: max_value = 100 self.cmap = cm.RdYlGn #pylint: disable=no-member self.norms = Normalize( 0, max_value ) mapper = cm.ScalarMappable( cmap = self.cmap, norm = self.norms ) def get_alpha( *args, **kw ): return 1.0 mapper.get_alpha = get_alpha self.mapper = mapper
def __init__(self, data, ax, prefs, *args, **kw): PlotBase.__init__(self, data, ax, prefs, *args, **kw)
def __init__(self,data,ax,prefs,*args,**kw): PlotBase.__init__(self,data,ax,prefs,*args,**kw)