I can make a heatmap where 2 buttons select which of 2 data to actually display by adding 2 heatmap traces and having buttons which toggle which one is visible. E.g. in Julia:
traces = [PlotlyJS.heatmap(;z=rand(10,10), visible=(i==1)) for i=1:2]
layout = PlotlyJS.Layout(
updatemenus=[
PlotlyJS.attr(
type = "buttons", direction = "right", y = 1.05, x = 0, xanchor = "left", yanchor = "bottom",
buttons = [PlotlyJS.attr(; label, method="update", args=[attr(visible=circshift([true, false],i-1))]) for (i,label) in enumerate(["A", "B"])]
)
]
)
PlotlyJS.plot(traces, layout)
which gives me the following plot and clicking the buttons changes the image:
My question is, is there any way to do this with 2 sets of 2 buttons, where I have a different unique image for each of the 4 combinations of 2x2 buttons which are selected? Thanks.