예제 #1
0
def plot_fun(spec, dataset):
    spec = t.ExpressionType().asPython(spec)
    if isinstance(dataset, Dataset):
        PlotSpec(spec).plot(dataset.asPandas(), dataset.ind_names)
    else:
        # Assume a raw data frame
        PlotSpec(spec).plot(dataset, list(dataset.columns.values))
예제 #2
0
def plot_to_file_fun(basenames, spec, dataset):
    filenames = t.ExpressionType().asPython(basenames)
    spec = t.ExpressionType().asPython(spec)
    if isinstance(dataset, Dataset):
        PlotSpec(spec).plot(dataset.asPandas(), dataset.ind_names,
                            _format_filenames(filenames, spec))
    else:
        PlotSpec(spec).plot(dataset, list(dataset.columns.values),
                            _format_filenames(filenames, spec))
예제 #3
0
 def plotf_to_file(self, basenames, spec, dataset):
     filenames = ExpressionType().asPython(basenames)
     spec = ExpressionType().asPython(spec)
     spec = self._canonicalize_tree(spec)
     PlotSpec(spec).plot(dataset.asPandas(), dataset.ind_names,
                         self._format_filenames(filenames, spec))
예제 #4
0
 def plotf(self, spec, dataset):
     spec = ExpressionType().asPython(spec)
     spec = self._canonicalize_tree(spec)
     PlotSpec(spec).plot(dataset.asPandas(), dataset.ind_names)