Skip to content

Commit 3f71269

Browse files
harupyemmanuelle
authored andcommitted
Disable autosize on double click (#149)
* Disable autosize on double click * Add a comment explaining why this config is necessary
1 parent a4ca006 commit 3f71269

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/images.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,9 @@ fig.update_layout(
302302
margin={"l": 0, "r": 0, "t": 0, "b": 0},
303303
)
304304

305-
fig.show()
305+
# Disable the autosize on double click because it adds unwanted margins around the image
306+
# More detail: https://plot.ly/python/configuration-options/
307+
fig.show(config={'doubleClick': 'reset'})
306308
```
307309

308310
#### Reference

0 commit comments

Comments
 (0)