FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Legend problem with reduced font size · Issue #187 · matplotlib/matplotlib · GitHub

Repository navigation

Legend problem with reduced font size  #187

Closed

Description

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

    Contributor

    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)
    
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


      Back | FazBrowse Home | New Git URL