It looks like you're new here. If you want to get involved, click one of these buttons!

- All Categories 2.3K
- Chat 502
- Study Groups 21
- Petri Nets 9
- Epidemiology 4
- Leaf Modeling 2
- Review Sections 9
- MIT 2020: Programming with Categories 51
- MIT 2020: Lectures 20
- MIT 2020: Exercises 25
- Baez ACT 2019: Online Course 339
- Baez ACT 2019: Lectures 79
- Baez ACT 2019: Exercises 149
- Baez ACT 2019: Chat 50
- UCR ACT Seminar 4
- General 72
- Azimuth Code Project 110
- Statistical methods 4
- Drafts 10
- Math Syntax Demos 15
- Wiki - Latest Changes 3
- Strategy 113
- Azimuth Project 1.1K
- - Spam 1
- News and Information 148
- Azimuth Blog 149
- - Conventions and Policies 21
- - Questions 43
- Azimuth Wiki 715

Options

What tools do people (particularly John and Jacob) use to create network diagrams. I am particularly after tools to create Penrose graphical notation diagrams. These have a couple of features that that are not common to other types of networks: nested nodes for covariant derivatives and cross ties on edges for (anti)symmetrizers.

thanks Daniel

## Comments

The AT&T GraphViz toolset by Steven North and colleagues does automatic layout and is embedded in many graphing applications.

`The AT&T GraphViz toolset by Steven North and colleagues does automatic layout and is embedded in many graphing applications.`

One of tools I use is TikZ, a LaTeX package. For links to tutorials and examples, see https://delicious.com/stared/tikz. For tensor diagrams, see e.g. http://elishapeterson.wikidot.com/tikz:diagrams.

`One of tools I use is TikZ, a LaTeX package. For links to tutorials and examples, see https://delicious.com/stared/tikz. For tensor diagrams, see e.g. http://elishapeterson.wikidot.com/tikz:diagrams.`

I don't know what Jacob Biamonte uses, but like Piotr I favor TikZ. This mainly makes sense if you're using LaTeX, which is what you should be using to write any sort of papers that are heavy on equations.

`I don't know what Jacob Biamonte uses, but like Piotr I favor TikZ. This mainly makes sense if you're using LaTeX, which is what you should be using to write any sort of papers that are heavy on equations.`

I have looked at Tikz, but I do not see how that scales. For example I would like to present this tensor calculus proof of the Hairy Ball theorem using Penrose Graphical notation. AFAICT the Tikz source for that would look something assembler code for a small(?) operating system :). How do you guys keep it manageable?

I was hoping there is some kind of code generator that produces something like Tikz or GraphVis from high level descriptions. In the mean time I have come across HaTeX which could be used to provide something like that. Also some newer TeX distribution seem to include an embedded Lua interpreter, so that may also be a way to add a layer of abstraction.

`I have looked at Tikz, but I do not see how that scales. For example I would like to present this [tensor calculus proof](http://mathematica.stackexchange.com/a/71613/12306) of the Hairy Ball theorem using Penrose Graphical notation. AFAICT the Tikz source for that would look something assembler code for a small(?) operating system :). How do you guys keep it manageable? I was hoping there is some kind of code generator that produces something like Tikz or GraphVis from high level descriptions. In the mean time I have come across HaTeX which could be used to provide something like that. Also some newer TeX distribution seem to include an embedded Lua interpreter, so that may also be a way to add a layer of abstraction.`

TikZ is relatively clean and brief. For this https://en.wikipedia.org/wiki/File:Matrix_product_state_obc_tikz.svg it takes I didn't have to use too much code: https://gist.github.com/stared/11185110.

`TikZ is relatively clean and brief. For this https://en.wikipedia.org/wiki/File:Matrix_product_state_obc_tikz.svg it takes I didn't have to use too much code: https://gist.github.com/stared/11185110.`

But I guess there are other ways to go. In Predrag Cvitanović, "Group Theory: Birdtracks, Lie's, and Exceptional Groups", a book centered around such diagrams, has it done in Xfig (see "editing" > "xfig source for all birdtracks").

`But I guess there are other ways to go. In [ Predrag Cvitanović, "Group Theory: Birdtracks, Lie's, and Exceptional Groups"](http://birdtracks.eu/), a book centered around such diagrams, has it done in Xfig (see "editing" > "xfig source for all birdtracks").`

TikZ might be eventually useful if you have a lot of reoccurring diagrams for which you e.g. have to readjusts notations, I don't know, it looks to me like quite unhandy for more general purposes. I used Xfig in the past, but I wouldn't recommend it anymore. Inkscape is able to do latex and you might give it a try, if you haven't yet.

`TikZ might be eventually useful if you have a lot of reoccurring diagrams for which you e.g. have to readjusts notations, I don't know, it looks to me like quite unhandy for more general purposes. I used Xfig in the past, but I wouldn't recommend it anymore. Inkscape is able to do latex and you might give it a try, if you haven't yet.`

Talking about reoccurring diagrams, I just stumbled upon what seems to be a funny attempt to encode runes with 12 sägments.

`Talking about reoccurring diagrams, I just stumbled upon what <a href="http://en.wikipedia.org/wiki/File:Manuscript_Thet_Oera_Linda_Bok,_pagina_48.jpg">seems to be a funny attempt</a> to encode <a href="http://en.wikipedia.org/wiki/File:Dalrunor.svg">runes</a> with 12 sägments.`

Daniel wrote:

We probably don't: like most mathematicians, we live and breathe LaTeX!

Here is a paper Jason Erbele and I wrote with lots of diagrams in it, sort of similar to what you might want, and here is the underlying LaTeX file, with lots of TikZ diagrams in it.

It seems stressful at first, but after a while one gets used to it, since one is mostly reusing and adapting the same bits of code over and over. If we could afford to pay someone to create a better system, we probably would. Instead we listen to lots of music while working.

`Daniel wrote: > How do you guys keep it manageable? We probably don't: like most mathematicians, we live and breathe LaTeX! [Here](http://math.ucr.edu/home/baez/control.pdf) is a paper Jason Erbele and I wrote with lots of diagrams in it, sort of similar to what you might want, and [here](http://math.ucr.edu/home/baez/control.tex) is the underlying LaTeX file, with lots of TikZ diagrams in it. It seems stressful at first, but after a while one gets used to it, since one is mostly reusing and adapting the same bits of code over and over. If we could afford to pay someone to create a better system, we probably would. Instead we listen to lots of music while working.`

Thanks John. That is impressive!!

Meanwhile, I have come across the haskell-diagrams package which is getting closer to what I have in mind. There is also introductory video

During my exuberant youth I also used the xy-pic latex package. I seem to remember that as being more high level than tikz looks to me now, particularly the graph feature, but looking at the xy-pic manual I realize that I remember none of it and the syntax is more cryptic than it seemed back then.

I quite like graphviz/dot and in the past I have used Scheme code to generate dot files for more complex graphs. Unfortunately graphviz does not naturally support some aspects of Penrose notation, like nested nodes for covariant derivatives or having edges connect to specific ports on nodes since where edges attach to a node matters in Penrose notation. These are problems for many graph tools.

This is another reason general drawing tool like haskell-diagrams may be more appropriate.

`Thanks John. That is impressive!! Meanwhile, I have come across the [haskell-diagrams](http://projects.haskell.org/diagrams/) package which is getting closer to what I have in mind. There is also [introductory video](https://vimeo.com/84104226) During my exuberant youth I also used the xy-pic latex package. I seem to remember that as being more high level than tikz looks to me now, particularly the graph feature, but looking at the xy-pic manual I realize that I remember none of it and the syntax is more cryptic than it seemed back then. I quite like graphviz/dot and in the past I have used Scheme code to generate dot files for more complex graphs. Unfortunately graphviz does not naturally support some aspects of Penrose notation, like nested nodes for covariant derivatives or having edges connect to specific ports on nodes since where edges attach to a node matters in Penrose notation. These are problems for many graph tools. This is another reason general drawing tool like haskell-diagrams may be more appropriate.`

I would use Inkscape for something like John's diagrams. I presume you want a programmable solution Daniel, but I'm not clear why? I've used R in that way when I've needed to, but that hasn't been often.

`I would use Inkscape for something like John's diagrams. I presume you want a programmable solution Daniel, but I'm not clear why? I've used R in that way when I've needed to, but that hasn't been often.`

Daniel - I often use xy-pic for making diagrams, but these days TikZ is more popular among mathematicians, mainly because it's more flexible and can do more. It's attracted a large community of people who put examples and packages online. So, I've been getting my grad students to learn TikZ, and then learning it myself.

`Daniel - I often use xy-pic for making diagrams, but these days TikZ is more popular among mathematicians, mainly because it's more flexible and can do more. It's attracted a large community of people who put [examples](http://www.texample.net/tikz/examples/) and [packages](http://www.texample.net/tikz/resources/) online. So, I've been getting my grad students to learn TikZ, and then learning it myself.`

John wrote:

John, I am surprised that you think TikZ is more powerful than xy-pic. TikZ is clearly more popular/active/... while xy-pic seems on it's way out. However, the TikZ examples I have seen are way more verbose while still as cryptic as xy-pic.

TikZ examples I have seen laboriously specify all coordinates/dimensions/... in great detail whereas xy-pic also provides more advanced constructs like

`\xymatrix`

and particularly`\xygraph`

allow high level layout descriptions and let xy-pic figure out the details. If features like that exist in TikZ they were not used in examples that I have seen.In programming terms TikZ feels like assembler to me while xy-pic at least feel like APL or Perl (unreadable for a reason). However, I am just going by the examples I have seen, and the look of the TikZ code examples has discouraged me from investing the effort in learning it. Maybe there is a more concise way to write TikZ that I have not seen yet.

I am still leaning towards haskell-diagrams. I do not know how well it works yet, but at least I like the concept. It tries to keep layout descriptions as high level as possible while being more readable at least compared to xy-pic :) and it also has low level hooks for when you need them.

`John wrote: > TikZ is more popular among mathematicians, mainly because it's more flexible and can do more. John, I am surprised that you think TikZ is more powerful than xy-pic. TikZ is clearly more popular/active/... while xy-pic seems on it's way out. However, the TikZ examples I have seen are way more verbose while still as cryptic as xy-pic. TikZ examples I have seen laboriously specify all coordinates/dimensions/... in great detail whereas xy-pic also provides more advanced constructs like `\xymatrix` and particularly `\xygraph` allow high level layout descriptions and let xy-pic figure out the details. If features like that exist in TikZ they were not used in examples that I have seen. In programming terms TikZ feels like assembler to me while xy-pic at least feel like APL or Perl (unreadable for a reason). However, I am just going by the examples I have seen, and the look of the TikZ code examples has discouraged me from investing the effort in learning it. Maybe there is a more concise way to write TikZ that I have not seen yet. I am still leaning towards haskell-diagrams. I do not know how well it works yet, but at least I like the concept. It tries to keep layout descriptions as high level as possible while being more readable at least compared to xy-pic :) and it also has low level hooks for when you need them.`

Daniel wrote:

Yeah, probably. When I said TikZ was "more powerful", I merely meant that you can draw lots of stuff with TikZ that you can't draw with xy-pic, like this:

or this

My student Aaron Lauda pushed xy-pic to its limits and got it to draw things like this:

but it took huge amounts of work and he later regretted spending so much time on it.

I think the best approach is to get someone else to do the drawing for you.

`Daniel wrote: > However, the TikZ examples I have seen are way more verbose while still as cryptic as xy-pic. Yeah, probably. When I said TikZ was "more powerful", I merely meant that you can draw lots of stuff with TikZ that you can't draw with xy-pic, like this: <img src = "http://www.texample.net/media/tikz/examples/PNG/computer-diagram.png" alt = ""/> or this <img src = "http://www.texample.net/media/tikz/examples/PNG/computer-science-mindmap.png" alt = ""/> My student [Aaron Lauda](http://www-bcf.usc.edu/~lauda/xy/) pushed xy-pic to its limits and got it to draw things like this: <img src = "http://www-bcf.usc.edu/~lauda/xy/misctutorial/HDATQFT12.gif" alt = ""/> but it took huge amounts of work and he later regretted spending so much time on it. I think the best approach is to get someone else to do the drawing for you.`