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 LinearAlgebra: normalize | |
f = Figure() | |
ax1 = Axis(f[1, 1]) | |
slope1 = 2 | |
data1 = [1 0; slope1 1] * randn(2, 500) | |
scatter!(ax1, data1, alpha = 0.1) | |
ax2 = Axis(f[1, 2]) | |
slope2 = -0.5 | |
data2 = [1 0; slope2 1] * randn(2, 500) |
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
f = Figure() | |
main_ax = Axis(f[1, 1]) | |
twin_ax_layout = GridLayout(f[1, 1, Right()]) | |
twin_axis_pairs = map(1:3) do i | |
data_axis = Axis(f[1, 1]) | |
label_axis = Axis(twin_ax_layout[1, i], width = 0, alignmode = Outside(), yaxisposition = :right) | |
hidedecorations!(data_axis) | |
hidespines!(data_axis) | |
hidexdecorations!(label_axis) | |
linkyaxes!(data_axis, label_axis) |
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
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 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 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 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 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 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 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")) |
NewerOlder