Closed benmaier closed 5 years ago
@ulfaslak yo, I wrote a function which reproduces the figure in matplotlib. see https://github.com/benmaier/netwulf/blob/master/netwulf/tools.py#L72
I also figured out a way to post the js-created png back to python, but I think it's nicer if we don't display the js-png but recreate the figure in matplotlib. That way, one can actually still do stuff with the figure and possibly save the whole thing as a PDF or what not. What do you think? Display js-png or redrawn matplotlib figure?
Redrawing in matplotlib actually works great. However I have no doubt the posted picture should be available in the API somehow
Sorry for reacting so slowly to this. I think the latter (matplotlib) solution is nicest! Especially because it enables exporting in vector format, which is a serious limitation is using canvas. So this kinda solves two problems at once :D!
Post picture data to server
Display image in jupyter notebook
Find out wether the whole thing is running in a Jupyter notebook