def _prepare_data(self, datasets): interpolate = True stack = stack_datasets(datasets) if interpolate: (x, z) = interpolate_datasets(stack, points=4800) x = array([x] * len(datasets)) else: x, z = map(np.transpose, np.transpose(stack)) return x, None, z
def _prepare_data(self, datasets): stack = stack_datasets(datasets) x = stack[:,:,0] z = stack[:,:,1] y = array([ [i]*z.shape[1] for i in range(1, len(datasets) + 1) ]) self.x_upper = x[0,-1] self.z_upper = z.max() return x, y, z
def __init__(self, *args, **kws): self._set_plots( StackedPlot(), Surface2DPlot(), MplPlot(callback_obj=self), ) super(PlotGenerator, self).__init__(*args, **kws) self.datasets = kws['datasets'] self.stack = stack_datasets(self.datasets) self.cached_data = {} self._plot_type_changed()
def _prepare_data(self, datasets): stack = stack_datasets(datasets) x, y, z = bin_data(stack, 600) xi, yi, zi = cubic_interpolate(x, y, z, 600, 600) zi = np.clip(zi, 1, zi.max()) return xi, yi, zi