How to easily create graphs from tables?

Imagine I have a table with nested levels or a csv file with information like this: (or a little bit more complex with numbers on the right side)

fig 
    date 
        kumquat
        papaya 
            peach
            apple
    mango
        orange 
            pear
            avocado
    banana

Or an equivalent nested list (easy to build from the last data).

{fig, {date, {kumquat}, {papaya, {peach}, {apple}}}, {mango, {orange, {pear}, {avocado}}}, {banana}}}

What’s the easiest way to get a graph like this from it?

What I’m really interested is in creating plots like the next one from a table.

What package would you use to create them easily?

Some graph packages need that the user create complex relationship tables.

1 Like

I am not aware of a package that does this specifically.

Personally I would just produce LaTeX/TikZ output from Julia and compile that with pdflatex, but that does not qualify as easy.

I’d probably parse the nested list structure to a LightGraph and plot it with GraphRecipes, though the really nice design at the bottom would probably take specialized graph visualization software.

2 Likes