Skip to content

Legend overlaps the y-axis title #1594

Description

@juni-green

Hi,
Can we adjust the width/height of the legend (containing multiple legend items) to prevent it from being overlapped on y-axis title?
Here is the code which shows multiple y-axes but the legend overlaps the title of second y-axis (at the right side of the graph).

screenshot from 2017-04-13 12 07 32

Any help will be appreciated.
Thanks!

Activity

  1. etpinard commented on Apr 13, 2017

    @etpinard
    Contributor

    Can we adjust the width/height of the legend

    Short answer: no.

    Longer answer: I'm not sure how width/height would help you in this case. What you really need is to input a valid legend.x value like in http://codepen.io/etpinard/pen/WjbNRZ?editors=0010

    Alternatively, you can try increasing the right margin (e.g. with `layout.margin.r: 100) and/or make the trace name smaller.

  2. etpinard commented on Apr 18, 2017

    @etpinard
    Contributor

    Closing due to lack of activity after my #1594 (comment)

  3. juni-green commented on Apr 19, 2017

    @juni-green
    Author

    Thanks! It worked. Actually I was thinking to adjust its width and height such that the scrollbar could appear, but your solution worked better.

  4. legg681 commented on Apr 26, 2017

    @legg681

    Shouldn't plotly be aware of the second y-Axis and move the legend accordingly automatically?

  5. cirosantilli commented on Nov 24, 2017

    @cirosantilli

    legend below + x axis analogue: #1199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions