# Can I make a heatmap "pager" based on 2 sets of 2 buttons?

**URL:** <https://community.plotly.com/t/can-i-make-a-heatmap-pager-based-on-2-sets-of-2-buttons/70563>\
**Category:** Plotly R, MATLAB, Julia, Net\
**Created:** [December 6, 2022, 8:58am UTC](https://community.plotly.com/t/can-i-make-a-heatmap-pager-based-on-2-sets-of-2-buttons/70563 "2022-12-06T08:58:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marius](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@marius](https://community.plotly.com/u/marius)\
**Post date:** [December 6, 2022, 8:58am UTC](https://community.plotly.com/t/can-i-make-a-heatmap-pager-based-on-2-sets-of-2-buttons/70563/1 "2022-12-06T08:58:06Z")

</div>

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:

```auto
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:

 ![Screenshot from 2022-12-06 00-53-07](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/3/7/37670af5e40580abb9632909b2bb335aabfebcab.png)

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.
