BasicTreePlots

Documentation for BasicTreePlots.

This is a package that aims to provide generic plotting recipes for tree like data structures. As such the recipes should only require that your data structure fulfills the AbstractTrees interface, i.e. has AbstractTrees.children(YourType) defined.

Optionally, BasicTreePlots.distance(YourType) and BasicTreePlots.label(YourType) can be defined to allow plotting trees with variable distances between children and parent nodes and pretty printing of each node in the tree respectively.

Currently, we only provide Makie.jl backends, but are interested in contributions for recipes for Plots.jl and TidierPlots.jl. As well as any other backends or custom tree structures that don't work automatically. See the ext folder for example extensions.

Installation

using Pkg
Pkg.add("BasicTreePlots")

Or the development version with

using Pkg
Pkg.dev("https://github.com/BenjaminDoran/BasicTreePlots.jl.git#main")

Basic usage

using CairoMakie, BasicTreePlots
tree = ((:a, :b), (:c, :d))
treeplot(tree)
Example block output

see Tutorials and Gallery for more in depth examples

treeplot() documentation

see reference for other function's documentation

Contributors