Skip to content

Large markers escape legend #8705

Closed as not planned
Closed as not planned

Description

@amueller

Bug report

Bug summary

Increasing marker size leads to markers that escape the legend boundaries (or even the figure)

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt

a, = plt.plot(np.random.uniform(size=10), np.random.uniform(size=10), '*',  markersize=40)

b, = plt.plot(np.random.uniform(size=10), np.random.uniform(size=10), '*',  markersize=40)
plt.legend([a, b],
           ["training data/target", "test data", "test prediction"],
           ncol=3, loc=(.1, 1.025))

Actual outcome

image

Expected outcome

Legend box grows to capture whole marker.

Matplotlib version

  • Operating System: Ubuntu 17.04
  • Matplotlib Version: 2.0.1 (conda default channel)
  • Python Version: 3.5

Activity

  1. amueller commented on Jun 2, 2017

    @amueller
    ContributorAuthor

    Similarly it can happen that the markers overlap:
    image

  2. added this to the milestone on Oct 17, 2017
  3. github-actions commented on Apr 12, 2023

    @github-actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  4. added
    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.
    on May 30, 2023
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

    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions