# Type hierarchy graphic in docs build

**URL:** <https://discourse.julialang.org/t/type-hierarchy-graphic-in-docs-build/34066>\
**Category:** General Usage\
**Tags:** question, graphics, type\
**Created:** [February 1, 2020, 9:49pm UTC](https://discourse.julialang.org/t/type-hierarchy-graphic-in-docs-build/34066 "2020-02-01T21:49:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [February 1, 2020, 9:49pm UTC](https://discourse.julialang.org/t/type-hierarchy-graphic-in-docs-build/34066/1 "2020-02-01T21:49:23Z")

</div>

Is there any pre-existing method for generating a type hierarchy as a graphic image for a `Documenter` build?

My goal is to have the graphic generated automatically.

---

<div class="post-metadata">

**Author:** ![Jakub\_Wronowski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jakub_wronowski/32/204030_2.png) [@Jakub\_Wronowski](https://discourse.julialang.org/u/Jakub_Wronowski)\
**Post date:** [February 1, 2020, 10:08pm UTC](https://discourse.julialang.org/t/type-hierarchy-graphic-in-docs-build/34066/2 "2020-02-01T22:08:32Z")

</div>

Maybe graphviz tool will work for you. there is [julia binding](https://github.com/Keno/GraphViz.jl). Generating DOT file calling subtypes() recursively should be easy.

---

<div class="post-metadata">

**Author:** ![EHBaozi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ehbaozi/32/14854_2.png) [@EHBaozi](https://discourse.julialang.org/u/EHBaozi)\
**Post date:** [February 1, 2020, 10:12pm UTC](https://discourse.julialang.org/t/type-hierarchy-graphic-in-docs-build/34066/3 "2020-02-01T22:12:49Z")

</div>

[GraphRecipes.jl](https://github.com/JuliaPlots/GraphRecipes.jl)?

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [February 2, 2020, 2:59am UTC](https://discourse.julialang.org/t/type-hierarchy-graphic-in-docs-build/34066/4 "2020-02-02T02:59:35Z")

</div>

do these two threads + these responses put together almost work?

> [@Planning Large Projects](https://discourse.julialang.org/t/planning-large-projects/28562/12):
>
> I think it could be an interesting project to build something with an interface kinda like [Cthulhu.jl](https://github.com/JuliaDebug/Cthulhu.jl) where instead of descending into @code\_typed, it displays a type hierarchy like this [1]: Number (Core) Complex (Base) Real (Core) AbstractFloat (Core) BigFloat (Base.MPFR) Float16 (Core) Float32 (Core) Float64 (Core) AbstractIrrational (Base) Irrational (Base) Integer (Core) Bool (Core) Signed (Core) BigInt (Base.GMP) Int128 (Core) Int16 (Core) Int3…

> [@Flow Charts? LightGraphs?](https://discourse.julialang.org/t/flow-charts-lightgraphs/31139/4):
>
> I still don’t have access to a computer with Julia on it frowning . Looking at your code, I don’t think that GraphRecipes is the right fit for you without some fairly serious modification. Right now we don’t do anything to make sure that edges go around nodes and other edges that are in their way. Instead, we always try to find a layout that minimizes intersections between edges. The layout that you are forcing graphplot to use has edges 3\to4 and 4\to5 lying right on top of 5\to3. Presumabl…

Light graphs could work they do have a hierarchy thingy majig. I had trouble getting flowchart like behaviour with light graph plots.

---

<div class="post-metadata">

**Author:** ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Post date:** [February 2, 2020, 6:05am UTC](https://discourse.julialang.org/t/type-hierarchy-graphic-in-docs-build/34066/5 "2020-02-02T06:05:47Z")

</div>

If, for some reasons, graphical representation is not absolute priority and automated ascii type hierarchy generation is enough, you may use this solution [https://github.com/JuliaLang/julia/issues/24741#issuecomment-496212498](https://github.com/JuliaLang/julia/issues/24741#issuecomment-496212498)

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [February 2, 2020, 7:07pm UTC](https://discourse.julialang.org/t/type-hierarchy-graphic-in-docs-build/34066/6 "2020-02-02T19:07:15Z")

</div>

@chakravala - I’m starting to kick something off for this type of thing because it keeps coming up. Someone asked for some design docs for the AnalysisWorkflows project and I realized it’s time I worked on the project… I started a repo here: [GitHub - caseykneale/Sherlock.jl: A high functioning package detective.](https://github.com/caseykneale/Sherlock.jl) Feel free to contribute too it if you want, do your own thing, or hang out while I chip away to make it useful.

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [February 2, 2020, 7:39pm UTC](https://discourse.julialang.org/t/type-hierarchy-graphic-in-docs-build/34066/7 "2020-02-02T19:39:26Z")

</div>

I will look into all these suggestions when I have time.

Note that I need something that works on a Travis CI for building the documentation. It’s not enough if it can run in a local REPL, it also needs to work on Travis CI.

---

<div class="post-metadata">

**Author:** ![anon92994695](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Post date:** [February 2, 2020, 7:42pm UTC](https://discourse.julialang.org/t/type-hierarchy-graphic-in-docs-build/34066/8 "2020-02-02T19:42:23Z")

</div>

Gotchya gotchya, I think this could work for that if I build it right. I’ll try my best to keep that in mind as things go :).
