This file contains hidden or 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
| hexradius = 45 | |
| hexpoly(p, hexradius) = Makie.Polygon(Ref(p) .+ Point2f[hexradius .* (cos(a), sin(a)) for a in range(pi / 6, 13pi / 6; length=7)[1:6]]) | |
| s = Scene(camera = campixel!) | |
| function hex_center(q::Int, r::Int, radius) | |
| # axial coordinates | |
| x = radius * sqrt(3) * (r + q / 2) | |
| y = radius * (3/2) * q |
This file contains hidden or 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 GLMakie | |
| f = Figure() | |
| ax = Axis(f[1, 1]) | |
| scatter!(ax, -1..2, randn(20_000), marker = 'O') | |
| t = text!(ax, | |
| [(0, 0), (1, 0), (0.5, 1)], | |
| text = ["Hello", "Bonjour", "Guten Tag"], |
This file contains hidden or 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 GLMakie | |
| using Makie.GeometryBasics: Polygon | |
| polys = [ | |
| Point2f[(0, 0), (3, 0), (3, 1), (2, 1), (2, 2), (1, 2), (1, 1), (0, 1)], | |
| Point2f[(0, 0), (2, 0), (2, 2), (0, 2)] .+ Point2f(4, 4), | |
| ] | |
| shifts = Observable([Point2f(0, 0) for _ in polys]) |
This file contains hidden or 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
| use AppleScript version "2.4" -- Yosemite (10.10) or later | |
| use framework "Foundation" | |
| use scripting additions | |
| tell application "Capture One" | |
| tell current document | |
| set _variants to every variant whose selected is true | |
| -- Initialize variables to store the first and last date | |
| set startDate to missing value |
This file contains hidden or 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 CairoMakie | |
| using GLMakie | |
| GLMakie.activate!() | |
| f = Figure() | |
| for i in 1:3, j in 1:3 | |
| Axis(f[i, j], title = "$i $j") | |
| end | |
| display(f) |
This file contains hidden or 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 LinearAlgebra | |
| @recipe(Stripy) do scene | |
| Attributes(; | |
| Makie.default_theme(scene, Lines)..., | |
| n = 3, | |
| offset = 10, | |
| ) | |
| end |
This file contains hidden or 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 CairoMakie | |
| f = Figure(fonts = (; regular = "CMU")) | |
| Label(f[1, 1], "Weights", fontsize = 20) | |
| gl = GridLayout(f[2, 1]) | |
| for i in 1:5, j in 1:5 | |
| text = if i <=3 && j <= 3 | |
| rich("w", subscript("$i,$j")) |
This file contains hidden or 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
| @recipe(AxisFunction) do scene | |
| default_theme(scene, Lines) | |
| end | |
| Makie.data_limits(::AxisFunction) = Rect3f(Point3f(NaN), Vec3f(NaN)) | |
| Makie.boundingbox(::AxisFunction, space::Symbol = :data) = Rect3f(Point3f(NaN), Vec3f(NaN)) | |
| function Makie.plot!(p::AxisFunction) | |
| func = p[1] | |
| # # could use transf to compute points equidistant in transformed space |
This file contains hidden or 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
| f, ax, sc = scatter(cumsum(randn(1000)), markersize = 3, label = "Scatter") | |
| leg = Legend(f[1, 2], ax) | |
| leg.entrygroups[][1][2][1].elements[1].attributes.markersize = Observable(10) | |
| notify(leg.entrygroups) | |
| f |