Understand Makie's Scene Graph architecture
masterMakie uses a hierarchical structure called a scene graph to compose complex plots. The two fundamental objects are:
Scene: An abstract rectangular canvas or viewport. AScenecan contain childScenes (which may have different camera or light settings) andPlotobjects. The structure forms a tree where there is always one rootScene.Plot: Objects that represent visual data. Plots are categorized into:- Primitive plots: Basic shapes that backends can render directly (e.g.,
Scatter,Lines,Text,Image,Mesh). - Non-primitive plots (Recipes): Complex plots composed of multiple child plots (e.g.,
ScatterLines,Poly, orBoxPlot). These are often implemented using the@recipemacro.
- Primitive plots: Basic shapes that backends can render directly (e.g.,
Every Scene is 3D capable, utilizing a 3D camera with projection and view matrices, though orthographic cameras can be used for 2D effects.