GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Legend problem with reduced font size · Issue #187 · matplotlib/matplotlib

Legend problem with reduced font size  #187

New issue
Copy link
New issue
Copy link
Closed
Closed
Legend problem with reduced font size #187
Copy link

Description

@ddale
ddale
opened on Jun 20, 2011
Issue body actions

Original report at SourceForge, opened Thu Jan 13 07:05:53 2011

Reducing the font size results in an incorrect line style being shown in the legend. Take this code snippet

import matplotlib
matplotlib.rcParams['font.size']=5
from pylab import *
plot([1,2,3,4], '--', label='A')
legend()
show()

Please see the annotated output of this code.

SourceForge History

  • On Thu Jan 13 07:05:54 2011, by sgrover1: File Added: 398605: image.png

Activity

  1. leejjoon commented on Jul 21, 2011

    @leejjoon
    leejjoon
    on Jul 21, 2011
    Contributor
    More actions

    It is not that the line style is actually wrong, but it looks wrong because the handlelength is too short.
    You need to explicitly increase the handlelength.

    plt.legend(handlelength=5)
    
  2. leejjoon
    closed this as completedon Jul 21, 2011
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

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.