Skip to content

[Feature request] Allow annotations and layout images to be positioned relative to the container, not just the x/y axes or plotting area #7665

@kburchfiel

Description

@kburchfiel

One thing I really appreciate about title positioning in Plotly is that I can set title locations relative to the container, not just the plotting area or x axis, via the title_xref and title_yref settings. This makes it much easier to achieve consistent title placement across different charts, as many different factors can change the shape of the plotting area.

Would it be possible to add container as an xref and yref option for annotations and images also? I've been needing to manually adjust these across charts, which can take a decent amount of time. (For PNG exports, I can achieve consistent placements by adding them in via Pillow, but this won't help for HTML-based charts.)

Also, one somewhat-related question (which I'm happy to move to a separate issue if needed): Is there a way to ensure that an image will always be the same size, in pixels, as long as the width of the chart (in pixels) is always the same? It appears that, even when the sizex and sizey settings stay the same, the image size can vary. (Since these values are relative to the chart's area, though, this is probably to be expected. But being able to specify a fixed size, e.g. 300x200px, would be fantastic.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2considered for next cyclefeaturesomething new

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions