Seeking a chart program to generate charts by specifying elements, not coordinate
Posted by Gold-Plant8923@reddit | learnprogramming | View on Reddit | 12 comments
I'm looking for a program or tool that can generate simple charts where I specify only the elements (circles, rectangles, lines, arrows, text). I want the tool to automatically adjust the size and position of these elements.
For example, I'd like to be able to input something like this:
ellipse
vertical {
ta text "a"
tb text "b"
tc text "c"
}
text "f"
ellipse
vertical {
t1 text "1"
t2 text "2"
t3 text "3"
}
arrow ta -> t3
arrow tb -> t1
arrow tc -> t2ellipse
vertical {
ta text "a"
tb text "b"
tc text "c"
}
text "f"
ellipse
vertical {
t1 text "1"
t2 text "2"
t3 text "3"
}
arrow ta -> t3
arrow tb -> t1
arrow tc -> t2
https://en.wikipedia.org/wiki/Inverse_function#/media/File:Inverse_Function.png
ellipse
ellipse
ellipse
ellipse
text "N"
text "Z" right
text "Q" right
text "R" rightellipse
ellipse
ellipse
ellipse
text "N"
text "Z" right
text "Q" right
text "R" right
onyxleopard@reddit
Have you tried https://graphviz.org/ ?
Gold-Plant8923@reddit (OP)
I've used Graphviz. I was looking to get insights from other users. Thank you.
onyxleopard@reddit
There’s also https://penrose.cs.cmu.edu/.
Gold-Plant8923@reddit (OP)
Thank you. I checked out the homepage, and it seems capable of producing fancy visuals from specified diagram types.
onyxleopard@reddit
You creat injection, subjection, etc. diagrams like this example: https://penrose.cs.cmu.edu/try/?examples=set-potatoes/non-surjection-not-epimorphism
Gold-Plant8923@reddit (OP)
If the diagram format you want to create is supported, Penrose seems like it would be easier to write. I understand now that the choice of tool depends on the scope of the diagram I want to describe. Thank you.
onyxleopard@reddit
There’s also https://penrose.cs.cmu.edu/.
desrtfx@reddit
Gold-Plant8923@reddit (OP)
Having seen Mermaid's homepage, I got the impression that for its supported applications, it's simpler to describe diagrams than with Graphviz.
Gold-Plant8923@reddit (OP)
So Graphviz really is recommended. I'll check out Mermaid. Thank you.
Gold-Plant8923@reddit (OP)
I want to avoid explicitly defining positions and sizes (e.g., ellipse position '100,100' size '200, 500'). Do you know of any suitable tools?
Gold-Plant8923@reddit (OP)
https://upload.wikimedia.org/wikipedia/commons/1/17/Number-systems.svg