Issue: Passing `scenekw` Arguments in Makie Recipes

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)
1 Like

It seems a similar issue was raised here with no solution.

1 Like

Unfortunately I think that this needed use case pattern is not supported. There not so many recipe examples for this use case, however. But if the plot recipe is to create an LScene, it seems that we should be able to control how it is created, no?