Commit d94883d1 authored by Zahra Najafabadi's avatar Zahra Najafabadi

tried to get figure

parent 0fc33092
from visualization.multilayer import *
from visualization.colors import all_color_names,colors_default
from core import multinet
import networkx as nx
# generate the data
import datagenerator
## you can try the default visualization options --- this is the simplest option/
......
from flask import request, Response
from initialdemo.NodeInfo import NodeInfo
import pickle as json
import io
from flask import request, Response
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from visualization.multilayer import *
from core import multinet
def get():
## multilayer
multilayer_network = multinet.multi_layer_network().load_network("/home/zarah/Downloads/multigraph2.gpickle", directed=False, input_type="gpickle_biomine")
multilayer_network.basic_stats() ## check core imports
multilayer_network.visualize_network(style="diagonal")
import visualization.multilayer as m
fig = m.main_figure
output = io.BytesIO()
FigureCanvas(fig).print_png(output)
return Response(output.getvalue(), mimetype="image/png")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment