using CairoMakie, LaTeXStrings
set_theme!(Theme(palette=(color=[:red, :blue, :green],),))
f = Figure()
ax = Axis(f[1, 1])
for _ in 1:3
lines!(ax, rand(5))
end
f
For reference, I have a very basic library (which I intend to expand to do scientific animations), where I have a few themes created that might be a good reference for you. In this file I define the themes and in this other file I make some basic plots.
Thank you but sadly I guess I canāt use Makie based libraries. I wonder how do you learn and used to it. Even in your just two answers, I donāt get what exactly they different and why my trials were wrong. Structure Theme seems to be essential, but not in some examples as you shown. Maybe I can overcome these some problems by asking but I canāt write my own codes if I donāt understand the fundamental grammer of Makie.
Maybe have a look at how the default theme is defined:
I get that itās frustrating to try many things and nothing works, however, Makie would be magic if it just did whatever people think of trying Yes, everything could be documented better, but given our limited time, we canāt do that at once for every last aspect of the library (itās pretty big).
There are several āpalettesā in the default theme, each of these is meant to be used by Cyclers. And there are both color and patchcolor entries because sometimes people want different defaults for polygons (usually because they want them slightly transparent). Lines, scatter, text etc all use color, pretty much only poly and derivations of it like barplot use patchcolor.
Exactly how youāre doing it, asking people if you canāt figure it out yourself using the documentation and the source code. And ideally, contributing back to the documentation afterwards, this way for the next person after you everything will be a little easier to understand.