Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Heatmap tied X and Y axes

Hello
I would like to have shared X and shared Y axis for two heatmap side to side. The following code is my attempt:

import plotly.plotly as py
import plotly.graph_objs as go

trace1 = go.Heatmap(z=[[1, 20, 30, 50, 1], [20, 1, 60, 80, 30], [30, 60, 1, -10, 20]],
                   x=['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
                   y=['Morning', 'Afternoon', 'Evening'],
                   name='hm1')

trace2 = go.Heatmap(z=[[1, 5, 23, 58, 12], [21, 15, 35, 80, 32], [31, 10, 12, -5, 2]],
                   x=['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
                   y=['Morning', 'Afternoon', 'Evening'],
                   name='hm2')
fig = tools.make_subplots(rows=1, cols=2, subplot_titles=('1', '2'), shared_yaxes=True, shared_xaxes=True)
fig.append_trace(trace1, 1, 1)
fig.append_trace(trace2, 1, 2)
py.iplot(fig)

the problem is that when I zoom on one heat map, only the Y axis seems to be shared. X axis is independent for both heatmaps.
Could you help me please?
Thanks!

@fricadelle As long as you have 1 row and 2 columns, only yaxis can be shared. If you had 2 rows and 1 column then xaxis could be shared.