4 ms·
Once again, my use case is DSP block diagrams. I guess "ridiculous" is a bit strong, but the results certainly didn't look like what you generally find in this
by pierrec 8y ago
Once again, my use case is DSP block diagrams. I guess "ridiculous" is a bit strong, but the results certainly didn't look like what you generally find in this context. You can look at the diagrams in the link I gave for an idea of the kind of layout I was trying to achieve.
- andreareina 8y agoYeah when you have requirements around layout graphviz gets a bit hairy. It's still doable with rank directives and invisible nodes, but that's the point where I start to think if I shouldn't do it another way (e.g. in this case I'd probably have done an ascii diagram rendered). digraph G { rankdir=LR node [shape=rectangle] // nodes declared in order of horizontal position ("rank") exciter filter subgraph H { // nodes at the same horizontal rank rank=same plus [label="+"] // invisible node for layout purposes p1 [width=0, height=0, margin=0, label=""] } subgraph I { rank=same delay nl } subgraph J { rank=same filter_ [label="filter"] p2 [width=0, height=0, margin=0, label=""] } out exciter -> filter -> plus -> delay -> filter_ -> out filter_ -> p2 [arrowhead=none] p2 -> nl -> p1 [arrowhead=none] p1 -> plus } Here's the result: http://prntscr.com/n35czl http://prntscr.com/n35czl
- pierrec 8y agoNice! Thanks for sharing your graphviz-fu, that's actually not as hairy as I thought it would be, and the result is neat enough. I do remember playing with subgraphs and ranks when testing graphviz, but I gave up before getting this far. I'll try applying those techniques to more complex diagrams, and if I find it workable, I might just switch to that.