### MuratKhayrulin's blog

By MuratKhayrulin, history, 3 years ago, ,

Hi there!

I've made a simple tool for graph vizualization, that might be helpful in problems solving. The idea was to make something that could be used as easy as just copy-paste from input examples into the tool.

It's built on top of Google's Image Charts. Though service is deprecated currently, it works fine. Thanks to Google.

How to use: one of common ways to represent a graph is edges, described on separate lines with their endpoints and possibly some label (weight, cost, etc).

So all you need is to input these lines into the text area and press the button. Try it with these lines:

1 3 10
2 4 11
5 4 10
3 5 12
1 6 10
6 5 12


Is that easy?

You can also:

• comment out some lines with #;
• set checkbox to ignore the first line, that usually contains number of nodes or some other data;
• not show labels;
• plot a directed graph;
• UPD share link to a plotted graph, like this.

Thanks to homo_sapiens for review of the tool.

•
• +326
•

 » 3 years ago, # |   +51 For many years I use http://pastegraph.herokuapp.com/ made by VitalyPavlenko for quick and easy graph visualisation. It works almost the same as yours, but I like how it is possible to drag vertices in his implementation.
•  » » 3 years ago, # ^ | ← Rev. 2 →   +18 It's nice but why does a graph float and fight against me by self-adjusting? For the following list it produces visualization with intersection. I try to move a vertex but the script moves it back outside. Do you maybe know if it's possible to turn self-moving off? 1 2 1 3 2 3 2 4 3 4 1 4 MuratKhayrulin's tool handles this graph correctly and allows to add weights of edges. Hence, it is a better option in my opinion. Kudos for Murat.
•  » » » 3 years ago, # ^ | ← Rev. 2 →   +4 It's a bit tricky but I managed to move vertices of K4 so that there are no self-intersections :)I don't know if it is possible to tune this behaviour, that doesn't bother me much.UPD Codeforces logic for handling images in comments surprises me. Sometimes it resizes small images so that they become even smaller, and sometimes it keeps large screenshots as is.
 » 3 years ago, # |   0 Nice tool!
 » 3 years ago, # |   0 This is really awesome thanks!
 » 3 years ago, # |   0 Wow, this is really useful! Thanks a lot!
 » 3 years ago, # |   0 Auto comment: topic has been updated by MuratKhayrulin (previous revision, new revision, compare).
 » 3 years ago, # |   0 Thanks for sharing!
 » 3 years ago, # |   +7 Thank you. It's very much helpful. :)
 » 4 weeks ago, # |   -7 Amazing! saved my half an hour, here was the graph I wanted to drawhttps://tinyurl.com/y4g8o2te
 » 4 weeks ago, # |   +15 I think csacademy's graph editor is better.