I have written a small program with plots such trees using Asymptote (based on ANDREW J. KENNEDYs algorithm for drawing trees, J. Functional Programming 6 (3): 527–534, May 1996). The program generates a sequence of draw commands, stores them as asy-file and does an external call of Asymptote for this file.
Output can be either eps, png, pdf or svg. (Tikz is still planned. In this case Asymptote isn’t used)
As an example this is the output of a randomly generated tree:
When writing this program I thought having (a reimplementation of) Asymptote as Julia package would be great (provided permission of the developers of Asymptote is given). What are your opinions?
We do have a Cairo.jl package, and there is the Compose.jl package if you want a simpler higher-level graphics interface, and GLVisualize.jl … not sure what re-implementing Asymptote would add? Certainly you would have to re-think the Asymptote syntax (which is C++ like) for Julia’s idioms.
You’re volunteering? I was active for some time to find a latex-style labeling solution, but did not make real progress. It really look’s like this is missing as independent library. Mathjax looked like a solution, but then i learned, they are not outputting svg, but a special html style where you need a browser rendering entity. The Mozilla MathML project looked also promising, but access to the logic goes via Gecko and that brings in the (whole) C++ API library chaos.
GtkMathView also is mentioned several times, but seems abandoned.
“There is also TikzGraphs.jl” Unfortunately I wasn’t aware of this package (my fault! ). I like Tikz and I think this package indeed is very useful.
Personally I believe that concerning 3D Asymptote has some advantages over Tikz. However when reading that Asymptote has more than 80.000 lines of low level C++ code (as of June 2010) I have given up the idea of a reimplementation as a Julia package.
Coming from C++, I’d say that’s about right. But what really counts is the number of hairs left on your head when you’re finished, I think there it’s the other way around
Is it available for use from within Julia? Looking at the examples, the interface seems very low-level compared to Tikz, but I must say the results are stunning.
D3 is basically 2D vector graphics (svg) programming, analog to directly programming openGL for 3D. So it’s good if you want to develop your own custom visualisations. For a stunning example of this: A visual introduction to machine learning
Now if your looking for a more high level plotting lib: use plotlyJS.jl. The 2D plots of plotly are itself based on D3.js (the 3D ones are based on webGL).