3 ms·
I've found a really nice workflow with Claude for generating high quality diagrams. Say you want to come up with, eg, a diagram depicting clustering with k-nea
by pizza 2y ago
I've found a really nice workflow with Claude for generating high quality diagrams.
Say you want to come up with, eg, a diagram depicting clustering with k-nearest neighbors:
1. Ask Claude: 'please generate an SVG diagram depicting clustering in k-nearest neighbors, make it look like <details>'
2. Take a screenshot of the generated diagram. Paste it into your next response to ground Claude by letting it see how the code actually rendered. Also, give your:
- what changes you want next for next round, eg style this differently, use more colors, replace x with y, etc
- what you like and want to keep, or even explore further
3. Do this iteration several times
4. Once you get somewhere ~80% close to where you want, save the code into a .svg file
5. Open it in Inkscape, manually make edits to close the gap
The nice thing about this is that many illustrations are actually somewhat tree-structured - they have different parts in them, ie there are child sub-diagrams inside the whole diagram. So, you can recursively do this process again for each additional 'sub-diagram' you would like to put in the illustration, basically doing breadth-first search to build up the illustration.
- chickenbigmac 2y agowhat do you normally use the diagrams for? Personal notes/blog posts/work?
- pizza 2y agoJust random musings, I have a somewhat visual imagination when it comes to math stuff so it is quite intriguing to see if I can get Claude to reproduce what I see in my 'mind's eye'. Here's an example w/o really getting into what it's about lol: https://codebeautify.org/svg-viewer/y241266c9 https://codebeautify.org/svg-viewer/y241266c9 Note: this one is actually just un-edited directly from Claude, I made this when I just had discovered Claude is reasonably decent at svg, and before I figured out the whole editable pipeline workflow.
- bboygravity 2y agoYour website can't be opened on Starlink (can't get past the Cloudflare thing).