def add_color_bar(self, data_obj, **kwargs): """ Places a color bar in the specified figure Parameters ---------- data_obj : data object Object that the color bar pertains to. Other Parameters ---------------- See parameters in Color_Bar() """ bar = _color_bar.Color_Bar(data_obj, **kwargs) label = kwargs.pop('label', None) if label is not None: #Make sure the label is in the correct format label = _utl.adjust_depth(label, 1) #Apply the label bar.label = label return(bar)
def label(self, str_list): if str_list is not None: str_list = _utl.adjust_depth(str_list, 1) self.label_obj.gen_label(str_list, self.font_size) self.label_obj.place_label()