This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FreeType | |
using FreeTypeAbstraction | |
using Cairo | |
function normalized_metrics(font, char) | |
# load char with NO_SCALE flag to receive font units | |
# which can be scaled by the units_per_EM | |
FT_Load_Char(font, char, FT_LOAD_NO_SCALE) | |
m = font.glyph.metrics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set_theme!( | |
fontsize = 10, | |
font = "SF Compact Text Light", | |
LAxis = (xticksize = 3, yticksize = 3, xticklabelrotation = pi/6, | |
xticklabelalign = (:right, :center), xlabelpadding = 2, ylabelpadding = 5), | |
LRect = (strokewidth = 1,) | |
) | |
scene, layout = layoutscene(10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using AbstractPlotting | |
using AbstractPlotting.MakieLayout | |
using CairoMakie | |
## | |
function textlayer!(ax::LAxis) | |
pxa = lift(AbstractPlotting.zero_origin, ax.scene.px_area) | |
Scene(ax.scene, pxa, raw = true, camera = campixel!) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set_theme!( | |
font = "SF Display Compact Pro Light", | |
fontsize = 10, | |
rowgap = 12, | |
colgap = 12, | |
LAxis = ( | |
xticksize = 3, | |
yticksize = 3, | |
xlabelpadding = 3, | |
ylabelpadding = 3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using AbstractPlotting | |
using AbstractPlotting.MakieLayout | |
using GLMakie; GLMakie.activate!() | |
GLMakie.GLFW.WindowHint(GLMakie.GLFW.FLOATING, 1) | |
using LinearAlgebra | |
## | |
scene = Scene(center = false, raw = true, resolution = (800, 800)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set_theme!(colgap = 30, rowgap = 30) | |
scene, layout = layoutscene(font = "SF Compact Light", fontsize = 25) | |
axs = layout[] = [LAxis(scene) for i in 1:4, j in 1:4] | |
hidexdecorations!.(axs[1:end-1, :], grid = false) | |
hideydecorations!.(axs[:, 2:end], grid = false) | |
group_left_protrusion = lift( | |
(xs...) -> maximum(y -> y.left, xs), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using AbstractPlotting | |
using AbstractPlotting.MakieLayout | |
using StatsBase | |
## | |
scene, layout = layoutscene(resolution = (600, 600)) | |
data = Node(randn(200, 2) * [1 2; 2 1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scene, layout = layoutscene(resolution = (800, 600)) | |
sublayout1 = layout[1, 1] = GridLayout() | |
sublayout1[] = [LAxis(scene) for _ in zeros(3, 2)] | |
sublayout2 = layout[1, 2] = GridLayout() | |
sublayout2[] = [LAxis(scene) for _ in zeros(2, 2)] | |
function get_content(layout, rows, cols, side = MakieLayout.GridLayoutBase.Inner()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Layered | |
using Animations | |
using VideoIO | |
using Colors | |
let | |
prev = pwd() | |
try | |
mktempdir() do path | |
cd(path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using RCall | |
using AbstractPlotting | |
using AbstractPlotting.MakieLayout | |
using GLMakie | |
using EarCut | |
using AbstractPlotting.ColorSchemes | |
using AbstractPlotting.GeometryBasics | |
using PolygonOps | |