aayushGaur / stac

Steady-State AC Network Visualization in the Browser - Developed at DATA61/Faculty of IT, Monash University - as a part of the summer research project.
http://immersive.erc.monash.edu.au/stac/
MIT License
16 stars 13 forks source link

Export graph as a vectorgraph #26

Open Vurgit opened 4 years ago

Vurgit commented 4 years ago

Is there any way to export or save the visualisation as a vectorgraph? This might be a useful feature cuz screeshots will make the quality worse.

ccoffrin commented 4 years ago

This is a good recommendation. In my experience it is difficult to export an HTML svg. However, I have had success in printing HTML pages to PDF and then cropping them to get a vectorized version.

xb00dx commented 3 years ago

I was about to creating the same issue,

I also tried to print the webpage as pdf but it seems I can only get half of the figure (even though the whole graph was shown in my browser)

eike-fokken commented 3 years ago

I'm not sure it helps here, but I wrote a stac_to_tikz converter:

https://bitbucket.org/efokken/stac_to_tikz/src/master/

It transforms the resulting Layout.txt into a tex file that contains a tikz-picture of the graph. I hear that tikz can be converted to svg but have no experience with it:

https://tex.stackexchange.com/questions/51757/how-can-i-use-tikz-to-make-standalone-svg-graphics

The converter doesn't support much, only coloring Slack, PV and PQ nodes and nothing else, but maybe its a good starting point.