I am unable to pass scenekw
arguments through a Makie recipe such that the LScene
is constructed correctly.
Regardless of what I try, the result is always a perspective view with axes.
My understanding is that Makie recipes should handle this use case without requiring an LScene
to be constructed beforehand.
However, the macros obscure what is happening internally, making it difficult to diagnose.
Below is a minimal working example:
using GLMakie, TestImages
@recipe(ImShow) do scene
Attributes(
interpolate = false,
camera = campixel!,
show_axis = false
)
end
Makie.args_preferred_axis(::Type{<: ImShow}, x) = Makie.LScene
Makie.preferred_axis_type(::ImShow) = Makie.LScene
function Makie.plot!(plt::ImShow)
img = plt[1][]
image!(plt, rotr90(img))
return plt
end
img = testimage("cameraman")
image_size = reverse(size(img))
f2 = Figure(size = image_size, figure_padding = 0)
imshow(f2[1, 1], img)
display(f2)