def _update_axes(self, *args): if self.state.x_att is not None: # Update ticks, which sets the labels to categories if components are categorical update_ticks(self.axes, 'x', self.state.x_kinds, self.state.x_log, self.state.x_categories, projection=self.state.plot_mode) if self.state.x_log: self.state.x_axislabel = 'Log ' + self.state.x_att.label else: self.state.x_axislabel = self.state.x_att.label if self.state.y_att is not None: # Update ticks, which sets the labels to categories if components are categorical update_ticks(self.axes, 'y', self.state.y_kinds, self.state.y_log, self.state.y_categories, projection=self.state.plot_mode) if self.state.y_log: self.state.y_axislabel = 'Log ' + self.state.y_att.label else: self.state.y_axislabel = self.state.y_att.label self.axes.figure.canvas.draw_idle()
def _update_axes(self, *args): if self.state.x_att is not None: # Update ticks, which sets the labels to categories if components are categorical update_ticks(self.axes, 'x', self.state._get_x_components(), self.state.x_log) if self.state.x_log: self.axes.set_xlabel('Log ' + self.state.x_att.label) else: self.axes.set_xlabel(self.state.x_att.label) if self.state.y_att is not None: # Update ticks, which sets the labels to categories if components are categorical update_ticks(self.axes, 'y', self.state._get_y_components(), self.state.y_log) if self.state.y_log: self.axes.set_ylabel('Log ' + self.state.y_att.label) else: self.axes.set_ylabel(self.state.y_att.label) self.axes.figure.canvas.draw()
def _update_axis_labels(self, *args): self.axes.set_xlabel(self.xatt) self.axes.set_ylabel(self.yatt) if self.xatt is not None: update_ticks(self.axes, 'x', list(self._get_data_components('x')), self.xlog) if self.yatt is not None: update_ticks(self.axes, 'y', list(self._get_data_components('y')), self.ylog)
def _update_axes(self, *args): if self.state.x_att is not None: # Update ticks, which sets the labels to categories if components are categorical update_ticks(self.axes, 'x', self.state.x_kinds, self.state.x_log, self.state.x_categories) if self.state.x_log: self.state.x_axislabel = 'Log ' + self.state.x_att.label else: self.state.x_axislabel = self.state.x_att.label if self.state.normalize: self.state.y_axislabel = 'Normalized number' else: self.state.y_axislabel = 'Number' self.axes.figure.canvas.draw_idle()
def _update_axes(self, *args): if self.state.x_att is not None: # Update ticks, which sets the labels to categories if components are categorical update_ticks(self.axes, 'x', self.state._get_x_components(), False) if self.state.x_log: self.state.x_axislabel = 'Log ' + self.state.x_att.label else: self.state.x_axislabel = self.state.x_att.label if self.state.normalize: self.state.y_axislabel = 'Normalized number' else: self.state.y_axislabel = 'Number' self.axes.figure.canvas.draw()
def _update_axes(self): if self.state.x_att is not None: # Update ticks, which sets the labels to categories if components are categorical update_ticks(self.axes, 'x', self.state._get_x_components(), False) if self.state.x_log: self.axes.set_xlabel('Log ' + self.state.x_att.label) else: self.axes.set_xlabel(self.state.x_att.label) if self.state.normalize: self.axes.set_ylabel('Normalized number') else: self.axes.set_ylabel('Number') self.axes.figure.canvas.draw()
def _update_axes(self, *args): if self.state.x_att is not None: # Update ticks, which sets the labels to categories if components are categorical radians = hasattr( self.state, 'angle_unit') and self.state.angle_unit == 'radians' update_ticks(self.axes, 'x', self.state.x_kinds, self.state.x_log, self.state.x_categories, projection=self.state.plot_mode, radians=radians) if self.state.x_log: self.state.x_axislabel = 'Log ' + self.state.x_att.label elif self.using_polar(): self.state.x_axislabel = "" else: self.state.x_axislabel = self.state.x_att.label if self.state.y_att is not None: # Update ticks, which sets the labels to categories if components are categorical update_ticks(self.axes, 'y', self.state.y_kinds, self.state.y_log, self.state.y_categories, projection=self.state.plot_mode) if self.state.y_log: self.state.y_axislabel = 'Log ' + self.state.y_att.label elif self.using_polar(): self.state.y_axislabel = "" else: self.state.y_axislabel = self.state.y_att.label self.axes.figure.canvas.draw_idle()
def _update_ticks(self, *args): if self.state.x_att is not None: # Update ticks, which sets the labels to categories if components are categorical radians = hasattr( self.state, 'angle_unit') and self.state.angle_unit == 'radians' update_ticks(self.axes, 'x', self.state.x_kinds, self.state.x_log, self.state.x_categories, projection=self.state.plot_mode, radians=radians, label=self.state.x_axislabel) if self.state.y_att is not None: # Update ticks, which sets the labels to categories if components are categorical update_ticks(self.axes, 'y', self.state.y_kinds, self.state.y_log, self.state.y_categories, projection=self.state.plot_mode, label=self.state.y_axislabel)
def _update_axis_labels(self): xlabel = self.component.label if self.component is not None else '' if self.xlog: xlabel = "Log %s" % xlabel ylabel = 'N' self._axes.set_xlabel(xlabel) self._axes.set_ylabel(ylabel) components = list(self._get_data_components('x')) if components: bins = update_ticks(self.axes, 'x', components, False) return if bins is not None: prev_bins = self.nbins auto_bins = self._auto_nbin(calculate_only=True) if prev_bins == auto_bins: # try to assign a bin to each category, # but only if self.nbins hasn't been overridden # from auto_nbin self.nbins = min(bins, 100) self.xlimits = (-0.5, bins - 0.5)