5 ms·
Sketchviz – Graphviz graphs in a hand-drawn style
- amerine 7y agoPretty neat. How does it work? Are you the creator?
- cldellow 7y agoHey, that's me, actually. Thanks for calling it pretty neat! As I mention on the about page, this is really just stringing a bunch of existing tools together, so most of the credit goes to those folks: - the Graphviz contributors for creating everyone's favourite 1990s-era graphing tool - Mike Daines for viz.js, which uses Emscripten to compile Graphviz to JavaScript - Preet Shihn, for RoughJS, which has the algorithms to transform shapes into scruffier shapes - GitHub user @ismay, who made a wrapper for RoughJS to make operating on SVGs, which Graphviz can emit as output, braindead simple I just duct-taped things together and did some of the tedious fit-and-finish stuff. For example, ensuring fonts render consistently regardless of whether you were previewing in the editor, downloading the PNG (which generates locally for speed) or embedding the graph on another website (which generates in an AWS Lambda using a headless Chrome to render it).
- bruth 7y ago> this is really just stringing a bunch of existing tools together This is essentially what all developers do to varying degrees. The whole is greater than the sum of its parts!
- ngcc_hk 7y agoYes. Great work. That is one of my favourite tools.
- tasogare 7y agoNice. Is there a library and/or command line tool?
- davidgerard 7y agothis is just awesome. I suppose it'd be hard to add it to the graphviz binaries.
- krilly 7y agoMatplotlib has XKCDify which is similar[0]. It's great for rough or estimated graphs that are not to be read accurately. [0]: https://jakevdp.github.io/blog/2012/10/07/xkcd-style-plots-in-matplotlib/ https://jakevdp.github.io/blog/2012/10/07/xkcd-style-plots-i...
- sandGorgon 7y agothe author of this post is the creator of Altair - a declarative visualization library in python built on Vega. https://altair-viz.github.io/ https://altair-viz.github.io/. its exceedingly cool!
- suyash 7y agoNice idea, however it would be lot easier and faster for my to draw the digram than it would take to write the code in strange language.
- tptacek 7y agoPeople who use Graphviz tend to know the basic Graphviz language, but, probably more importantly, it's easy for tools to generate it.
- recursivecaveat 7y agoAbsolutely this. If I'm making a diagram for a presentation I'm going to draw it manually so it looks just right. When we're debugging dataflow graphs with 4000 nodes, graphviz is the one and only.
- graphviz 7y agoThanks! A lot of the good stuff (e.g. stress majorization and the Jaccard distance model stolen for neato -Gmodel=subset) was done in the 2000s. Probably people criticize because they see B&W graphics, Times-Roman and splines rendered 1pt wide and we didn't use XML or JSON.
- jessaustin 7y agoYou might be wrong about this; you should try graphviz to find out.
- mcqueenjordan 7y agoOthers have mentioned generation and speed, but there's a much more important piece, IMO: Maintainability. With declarative text-based diagramming, you can check these in as text files, and when the system evolves or the diagram has a need to change, it's easy to make a change and re-generate the image.
- Fellshard 7y ago
- georgewsinger 7y agoAlso of interest: Wolfram's `XKCDConvert` function (https://resources.wolframcloud.com/FunctionRepository/resources/XKCDConvert https://resources.wolframcloud.com/FunctionRepository/resour...) in Mathematica. This allows you to convert plots, charts, diagrams, etc to XKCD style.
- pimlottc 7y agoReally cool! I like the random perturbations; you can use them to make squigglevision-style diagrams: https://giphy.com/gifs/sketchviz-squigglevision-WtV9O3ufeqeOqYnYDU https://giphy.com/gifs/sketchviz-squigglevision-WtV9O3ufeqeO...
- hajimuz 7y agoEven cooler!
- ygra 7y agoIs there a point to this? I've long been wanting to implement hand-drawn styles for our interactive graph editing component, but one part that kept me from doing it was that I had no idea how to keep the strokes stable enough to not induce seizures when editing. At least I don't want everything wobbling around when I draw lines or move a node. And I couldn't find a good way to incrementally just roughen up subsequent parts of a stroke.
- sandGorgon 7y agothis is very very cool! thanks so much.
- VexorLoophole 7y agoLooks great, really like the look of it. For me it always helps, when my daily tools look pleasing. Somehow makes working with them less tiring. Also working with Graphviz was a great experience while my thesis. Simple and easy enough to 'sketch out', but at the time it offers all needed tools to expand these sketches into something complex. Great tool! Sadly my work uses draw.io which is the exact opposite. For quick sketches on my phone I use MindNode.
- contingencies 7y agoAnother neat graphviz trick is using vuejs (or now sketchviz!) to provide the UI, then layering JS to make the nodes clickable as a visual programming interface.
- renke1 7y agoIt can be combined with Wired Elements [0] for the whole hand-drawn experience! [0] https://wiredjs.com https://wiredjs.com