# How to easily create graphs from tables?

**URL:** <https://discourse.julialang.org/t/how-to-easily-create-graphs-from-tables/28069>\
**Category:** Visualization\
**Created:** [August 27, 2019, 11:58pm UTC](https://discourse.julialang.org/t/how-to-easily-create-graphs-from-tables/28069 "2019-08-27T23:58:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juan/32/7657_2.png) [@Juan](https://discourse.julialang.org/u/Juan)\
**Post date:** [August 27, 2019, 11:58pm UTC](https://discourse.julialang.org/t/how-to-easily-create-graphs-from-tables/28069/1 "2019-08-27T23:58:38Z")

</div>

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)

```julia
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?

![](https://global.discourse-cdn.com/julialang/original/3X/5/b/5b5d0ac74f9875462167e19694a85bca100a33df.png)

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

 ![](https://global.discourse-cdn.com/julialang/original/3X/1/b/1be42c919810d6d0b99c25d5749508b22efc2981.png)

What package would you use to create them easily?

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

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 28, 2019, 6:09am UTC](https://discourse.julialang.org/t/how-to-easily-create-graphs-from-tables/28069/2 "2019-08-28T06:09:39Z")

</div>

> [@Juan](#):
>
> What package would you use to create them easily?

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_.

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [August 28, 2019, 8:38am UTC](https://discourse.julialang.org/t/how-to-easily-create-graphs-from-tables/28069/3 "2019-08-28T08:38:18Z")

</div>

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.
