using Plots
n_from = 2
n_to = 3
froms = [Plots.fakedata(100) for i = 1:n_from]
tos = [Plots.fakedata(100) for i = 1:n_to]
gl = grid(n_from + 1 , n_to + 1)
p = plot(;layout = gl, aspect_ratio = 1.0)
# setup subplots
for gi in CartesianIndices(axes(gl))
gi = Tuple(gi)
_subplot = gl[gi...]
if gi == (1, 1)
# bug, clears all subplots
#plot!(_subplot, legend = false, grid = false, foreground_color_subplot=:white)
continue
end
plot!(_subplot, aspect_ratio = 1.0, framestyle = :origin, link = :square, ticks=nothing,)
end
# plot column header
for i = 1:n_from
plot!(gl[1 + i, 1], froms[i], label="")
end
# plot row header
for j = 1:n_to
plot!(gl[1, 1 + j], tos[j], label="")
end
# plot swept volumes
for i = 1:n_from, j = 1:n_to
d = froms[i] .* tos[j]
plot!(gl[1 + i, 1 + j], d, label="")
end
display(p)
produces
and I would like to do something that looks like the following mock-up
I know you asked about Plots, but it’s too enticing for me to try and solve layout problems in Makie… Sorry!
using CairoMakie
f = Figure()
for i in 1:3, j in 1:4
if (i, j) != (1, 1)
ax = Axis(f[i+1, j+1])
hidedecorations!(ax)
hidespines!(ax)
hlines!(ax, 0)
vlines!(ax, 0)
lines!(ax, randn(200), color = :lightblue)
ylims!(-5, 10)
end
end
Label(f[1, 3:5], "Label across columns")
Label(f[3:4, 1], "Label across rows", rotation = pi/2)
f
Thanks, @jules! I would like to use Makie, but I’m nervous about not leveraging recipes written for RecipeBase.jl. Do you (or anyone) have any advice to offer about MakieRecipes.jl?
We’re heavily thinking about the recipes aspect, our internal design is just not one to one compatible with the plots recipe system. So one question is, how much can we emulate that system to make use of existing recipes, and the other is can we design a system that is better suited to makie’s capabilities