plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

[BUG]: legend1 behaves special

Open jendrikw opened this issue 5 months ago • 1 comments

Description

setting properties of layout.legend1 seems to have no effect. I'm very confused.

Screenshots/Video

Image (screenshot from codepen linked below)

Steps to reproduce

https://codepen.io/Shack-1-Spoilage/pen/MYKQzaV

Note that the legends have the same settings:

    legend1: {
      xref: "x1",
      yref: "y1",
      orientation: "h",
      x: 0.5,
      y: 0.5,
      xanchor: "center",
      yanchor: "center"
    },
    legend2: {
      xref: "x1",
      yref: "y2",
      orientation: "h",
      x: 0.5,
      y: 0.5,
      xanchor: "center",
      yanchor: "center"
    },
    legend3: {
      xref: "x1",
      yref: "y3",
      orientation: "h",
      x: 0.5,
      y: 0.5,
      xanchor: "center",
      yanchor: "center"
    }

jendrikw avatar Oct 22 '25 13:10 jendrikw

Hi, as far as I know there is no "legend1" property. It's "legend", "legend2", etc. See e.g. this documentation https://plotly.com/python/reference/scatter/#scatter-legend

my-tien avatar Oct 23 '25 08:10 my-tien