Ejemplo n.º 1
0
def plot_scatter(df, xdata, iso_column):

    names = set(df["name"].values)
    names.discard(None)
    names.discard(xdata)
    names.discard(iso_column)

    df = results.pivot_scalars(df,
                               index=xdata,
                               columns=iso_column,
                               values="value")

    renaming = dict()

    if iso_column:
        for c in list(df.columns):
            renaming[c] = iso_column + "=" + str(c)

    df = df.reset_index()

    renaming[xdata] = "time"

    df = df.rename(renaming, axis="columns")

    df.dropna(inplace=True)

    df["time"] = pd.to_numeric(df["time"])

    df.sort_values(by="time", inplace=True)

    print(df)

    xs = _list_to_bytes(df["time"])

    Gateway.chart_plotter.plotVectors(
        pl.dumps([{
            "title": column,
            "key": column,
            "xs": xs,
            "ys": _list_to_bytes(df[column])
        } for column in df if column != "time"]))

    return list(names)
Ejemplo n.º 2
0
def _plot_scalars_DF_scave(df):
    _plot_scalars_DF_simple(results.pivot_scalars(df))