I'm trying to plot 3 simple heatmaps, as shown in the code. However, 2 issues appear:
- Color bars does not appear in part of the heatmaps.
- The resulting plot is very small, and not in the usual proportion (see attached picture).
For your information: Seaborn version: 0.11.0. Matplotlib version: 3.3.4
Here is my code:
dates=pd.date_range(start='2019-01-01', periods=2, freq='D')
d0=pd.DataFrame([[np.nan, 0.1],[np.nan,0.3]], columns=dates)
d1=pd.DataFrame([[np.nan, 0],[np.nan, 0]], columns=dates)
d2=pd.DataFrame([[67,68]], columns=dates)
DATA=[d0,d1,d2]
fig, axs = plt.subplots(ncols=2, nrows=3, sharex='col', figsize=(20, 20),
gridspec_kw={'width_ratios': [1, 15]})
for k, df in enumerate(DATA):
(ax0,ax1)=axs[k]
sns.heatmap(df, annot=False, cmap=cmap, cbar_ax=ax0, ax=ax1)