def _prepare_categories(self, categories): categories = PlotReport._prepare_categories(self, categories) # Find max-value to fit plot and to draw missing values. self.missing_val = self._get_missing_val(max(self.max_x, self.max_y)) new_categories = {} for category, coords in categories.items(): X, Y = zip(*coords) X, Y = self._handle_none_values(X, Y, self.missing_val) coords = zip(X, Y) new_categories[category] = coords return new_categories
def _prepare_categories(self, categories): categories = PlotReport._prepare_categories(self, categories) # Find max-value to fit plot and to draw missing values. self.missing_val = self._get_missing_val(max(self.max_x, self.max_y)) new_categories = {} for category, coords in categories.items(): X, Y = zip(*coords) X, Y = self._handle_none_values(X, Y, self.missing_val) coords = zip(X, Y) new_categories[category] = coords return new_categories
def _prepare_categories(self, categories): categories = PlotReport._prepare_categories(self, categories) # Find max-value to fit plot and to draw missing values. # self.missing_val = self._get_missing_val(max(self.max_x, self.max_y)) self.x_missing_val = self._get_missing_val(self.max_x, self.xscale) self.y_missing_val = self._get_missing_val(self.max_y, self.yscale) # print self.x_missing_val, self.y_missing_val # set minima self.xlim_left = self._get_limit([self.xlim_left, self.min_x], 'min') self.ylim_bottom = self._get_limit([self.ylim_bottom, self.min_y], 'min') # set maxima x_plot_size = y_plot_size = None if self.show_missing: x_plot_size = self._get_plot_size(self.x_missing_val, self.xscale) y_plot_size = self._get_plot_size(self.y_missing_val, self.yscale) self.xlim_right = self._get_limit( [self.xlim_right, self.max_x, x_plot_size], 'max') self.ylim_top = self._get_limit( [self.ylim_top, self.max_y, y_plot_size], 'max') # self.diagonal_start = self.diagonal_end = None # if self.show_diagonal: # self.diagonal_start = max(self.xlim_left, self.ylim_bottom) # self.diagonal_end = min(self.xlim_right, self.ylim_top) new_categories = {} for category, coords in categories.items(): X, Y = zip(*coords) # X, Y = self._handle_none_values(X, Y, self.missing_val) X, Y = self._handle_none_values(X, Y, self.x_missing_val, self.y_missing_val) coords = zip(X, Y) new_categories[category] = coords # print len(new_categories[None]) # print new_categories[None] return new_categories