Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit d0c6faf

Browse files
constant legend item sizing
1 parent 1ebe971 commit d0c6faf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

plotly_express/_core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,8 @@ def make_figure(args, constructor, trace_patch={}, layout_patch={}):
736736
layout_patch["legend"] = {"tracegroupgap": 0}
737737
if "title" not in layout_patch:
738738
layout_patch["margin"] = {"t": 60}
739+
if "size" in args and args["size"]:
740+
layout_patch["legend"]["itemsizing"] = "constant"
739741
fig = ExpressFigure(
740742
data=frame_list[0]["data"] if len(frame_list) > 0 else [],
741743
layout=layout_patch,

0 commit comments

Comments
 (0)