def plot_intersection_matrix(elements: List[CMapMatrixElement], index, save):
    # fig = graph.plot_matrix_cmap_plain(
    #     elements, nvalves, nrows, "Valve Sequence", "sample x" + str(rowskip), "valves",  xlabels, ylabels)
    fig = graph.plot_matrix_cmap_plain(elements, nvalves, nrows, "", "",
                                       "valves", xlabels, ylabels, None)
    if save:
        graph.save_figure(fig, "./figs/valve_sequence_" + str(index))
Beispiel #2
0
                    nrowskip = 0
                    nrows += 1
                    for e in elements_buffer:
                        elements.append(e)
            except:
                pass

# print(elements)

# quit()

xlabels = [("v" + str(i + 1)) for i in range(nvalves)]
ylabels = [(str(int(i * rowskip / 100))) for i in range(nrows)]
# xlabels = []
# ylabels = []

# intersection_matrix = np.random.randint(0, 10, size=(max_val, max_val))
intersection_matrix = np.zeros((nvalves, nrows))

# print(intersection_matrix)

for e in elements:
    intersection_matrix[e.i][e.j] = e.val

print(intersection_matrix)

fig = graph.plot_matrix_cmap_plain(elements, nvalves, nrows, "Valve Sequence",
                                   "sample x" + str(rowskip), "valves",
                                   xlabels, ylabels, None, None)
graph.save_figure(fig, "./figs/valve_sequence")
Beispiel #3
0
def plot_intersection_matrix(elements, index, nrows, ncols, save, scale):
    fig = graph.plot_matrix_cmap_plain(
        elements, nrows, ncols, "Sequence evaluation", "sample bins", "",  xlabels, ylabels, scale, (16,7))
    if save:
        graph.save_figure(fig, "./figs/valve_sequence_random_prediction")
def plot_intersection_matrix2(elements, index, nrows, ncols, save, scale):
    fig = graph.plot_matrix_cmap_plain(elements, nrows, ncols, "", "", "",
                                       xlabels, ylabels, scale, None)
    if save:
        graph.save_figure(fig, "./figs/valve_sequence_" + str(index))