Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
d94883d1
Commit
d94883d1
authored
Jan 24, 2020
by
Zahra Najafabadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tried to get figure
parent
0fc33092
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
main.py
...-hub/semantic-linking-microservice/app/multilayer/main.py
+0
-5
multilayer.py
...-hub/semantic-linking-microservice/app/rest/multilayer.py
+23
-0
No files found.
src/data-hub/semantic-linking-microservice/app/multilayer/main.py
View file @
d94883d1
from
visualization.multilayer
import
*
from
visualization.multilayer
import
*
from
visualization.colors
import
all_color_names
,
colors_default
from
core
import
multinet
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/
## you can try the default visualization options --- this is the simplest option/
...
...
src/data-hub/semantic-linking-microservice/app/rest/multilayer.py
0 → 100644
View file @
d94883d1
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment