Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 5e2a4ed

Browse files
closes #91
1 parent 5375ffc commit 5e2a4ed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎plotly_express/_core.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ def make_trace_kwargs(args, trace_spec, g, mapping_labels, sizeref):
188188
result["marker"]["sizemode"] = "area"
189189
result["marker"]["sizeref"] = sizeref
190190
mapping_labels[v_label] = "%{marker.size}"
191+
elif k == "marginal_x":
192+
if trace_spec.constructor == go.Histogram:
193+
mapping_labels["count"] = "%{y}"
194+
elif k == "marginal_y":
195+
if trace_spec.constructor == go.Histogram:
196+
mapping_labels["count"] = "%{x}"
191197
elif k == "trendline":
192198
if v in ["ols", "lowess"] and args["x"] and args["y"] and len(g) > 1:
193199
import statsmodels.api as sm
@@ -556,7 +562,7 @@ def make_trace_spec(args, constructor, attrs, trace_patch):
556562
if args["marginal_" + letter] == "histogram":
557563
trace_spec = TraceSpec(
558564
constructor=go.Histogram,
559-
attrs=[letter],
565+
attrs=[letter, "marginal_"+letter],
560566
trace_patch=dict(opacity=0.5, bingroup=letter, **axis_map),
561567
)
562568
elif args["marginal_" + letter] == "violin":

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /