Created
April 19, 2021 08:29
-
-
Save jkrumbiegel/37594dbb14e0e108e31c82fdd224f988 to your computer and use it in GitHub Desktop.
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
measures = ["Endurance", "Coordination", "Speed", "Power Low", "Power Up"] | |
groups = ["boys", "girls"] | |
x = LinRange(-8, 9, 15) | |
f = Figure(resolution = (1000, 500)) | |
axs = [Axis(f[1, i]) for i in 1:length(measures)] | |
for (i, m) in enumerate(measures) | |
Box(f[1, i, Top()], backgroundcolor = :gray) | |
Label(f[1, i, Top()], m, padding = (5, 5, 5, 5)) | |
hlines!(axs[i], 0) | |
for (j, g) in enumerate(groups) | |
a, b = 2 * rand(), rand() | |
func(x) = a * x + b | |
data = func.(x) .+ 0.4 .* randn.() | |
lines!(axs[i], x, func) | |
scatter!(axs[i], x, data, color = [:black, :white][j], label = g) | |
end | |
end | |
axislegend(axs[1], position = :lt) | |
axs[3].xlabel = "Age" | |
hideydecorations!.(axs[2:end], grid = false) | |
linkaxes!(axs...) | |
colgap!(f.layout, 10) | |
f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment