Imshow figure whitespace reduction

Hello,

Can anyone tell me how to reduce the whitespace between the color bar and heatmap, generated with px.imshow and indicated in the plot below with an arrow? I’d rather not use aspect = 'auto' as I quite like the square layout, so I’d rather just shift the color bar to the right. I’ve tried the code below but it didn’t work:

figure_test.update_layout(
    margin=dict(l=20, r=200, t=20, b=20),
)

Many thanks,
Tim

Hi @TimothyK ,

take a look here:

2 Likes

Perfect, thanks very much!

1 Like