title: Using plotly express to show image and plot with animation
body: <p>I need some help making an animation with plotly express where each frame will include an image and a graph (preferably a plotly express graph) side by side. My goal is to have the animation be corresponding to time steps from each frame. Plotly express has an example of this with just images shown in the link below. But I do not know how to make a plotly express graph take the place of one of the images in the example.</p>
  <p>The link below will lead you to the plotly express example for &quot;Combining animations and facets&quot;</p>
  <p>Link to plotly for specific example: 'Combining animations and facets' (<a href="https://plotly.com/python/imshow/" rel="nofollow noreferrer">https://plotly.com/python/imshow/</a>)</p>
  <p>'''</p>
  <pre><code>from skimage import data, io
  import plotly.express as px
  data = io.imread(&quot;https://github.com/scikit-image/skimage-tutorials/raw/main/images/cells.tif&quot;)
  data = data.reshape((15, 4, 256, 256))[5:]
  fig = px.imshow(data, animation_frame=0, facet_col=1, binary_string=True)
  fig.show()
  </code></pre>
  <p>'''</p>
  <p>Update:</p>
  <p>So I can make side my side plots with images but I'm having a difficult time with animating it. Below is my current code:</p>
  <p>'''</p>
  <pre><code>imgR=np.random.rand(360,1000)
  imgR2=np.random.rand(360,1000)
        
  fig = make_subplots(rows=1, cols=2)
  
  fig.add_trace(
      go.Scatter(x=[1, 2, 3,4,5], y=[4, 5, 6,7,8]),
      row=1, col=1
  )
  
  fig.add_trace(
      px.imshow(imgR).data[0],
      row=1, col=2
  )
  frames=[go.Frame(data=[go.Scatter(x=[3,5,2,5,3],y=[3,4,5,3,3]),px.imshow(imgR2).data[0]],traces=[0,1])]
  
  fig.frames=frames
                   
  button = dict(
               label='Play',
               method='animate',
               args=[None, dict(frame=dict(duration=50, redraw=False), 
                                transition=dict(duration=0),
                                fromcurrent=True,
                                mode='immediate')])
  
  fig.update_layout(updatemenus=[dict(type='buttons',
                                showactive=False,
                                y=0,
                                x=1.05,
                                xanchor='left',
                                yanchor='bottom',
                                buttons=[button] )
                                        ],
                   width=800, height=500)
  fig.update_layout(height=600, width=800, title_text=&quot;Side By Side Subplots&quot;)
  
  fig.show()
  </code></pre>
  <p>'''</p>
  <p>Any help will be appreciated.</p>