I’m a Julia novice, and I’m confused by how and when to access Makie functions.
First point of confusion: There’s a package called Makie.jl, so my beginner’s assumption would be that I should initialize the package with the command
using Makie
However, the README on GitHub says to start using the package, we should begin with the command
using GLMakie
Question: Is there some logic to help me understand when a package is called by a different name than its repo?
Second point of confusion: The Makie GitHub README says to start with using GLMakie, and it includes an example containing the heatmap function. However, the documentation for the heatmap function begins with
using CairoMakie
Question: What isCairoMakie, when do I call it, and what supersedes what?
Question: Is there some logic to help me understand when a package is called by a different name than its repo?
My understanding is that the different backends used to be separate repos. For convenience, they were all moved into the monorepo: Makie.jl
Question: What isCairoMakie , when do I call it, and what supersedes what?
I don’t think there is any superseding going on here, just different backends for different use cases. Since GLMakie pops out its own window, it wasn’t used for the doc examples you were seeing in the browser
Makie.jl is both the name of the monorepo and of the package at the top level. The three backend packages are in subfolders in the Makie.jl repo but they don’t belong to the Makie.jl package. They depend on Makie.jl the package though, which defines all the infrastructure (together with MakieCore.jl, which is also in the monorepo).
I just want to mention that this package organization is quite unusual in julia; you’re not just being dense, and it’s not just because you’re a beginner. It’s confusing.
I would recommend that if you’re busy doing 2D plots, or you need vector output (SVG or PDF), you should just be doing using CairoMakie. If you want 3D or interactive plots, using GLMakie. That’s it, everything else should work the same way (with the exception of some things like remote execution, which probably aren’t immediately relevant to you)
Thanks to all who weighed in on this. I understand the evolution of the Makie package a bit better now, and I see how and why it has developed into this slightly confusing structure. But it’s certainly workable, especially with @kevbonham’s clear if-then guidance.
The monorepo structure should really be of no concern for end users, it is just for easier development because each Makie PR usually needs changes in CairoMakie etc to go along.