Skip to content

The linestyle 'None', ' ' and '' not supported by PathPatch. #5519

@Rezangyal

Description

@Rezangyal

The linestyle 'None', ' ' and '' not supported by PathPatch.
Line2D support these values, but PathPatch not.

the documentation say, that these are acceptable values:
http://matplotlib.org/api/patches_api.html#matplotlib.patches.PathPatch

from matplotlib import pylab
from matplotlib.patches import PathPatch
from matplotlib.path import Path
pylab.plot([0,1,2], [4,5,6], ls='solid') #ok
pylab.plot([0,1,2], [3,4,5], ls='-') #ok
pylab.plot([0,1,2], [3,5,7], ls='None') #ok
pylab.gca().add_patch(PathPatch(Path([(3,0), (2,1)]), fill=False, ls='-')) #ok
pylab.gca().add_patch(PathPatch(Path([(3,1), (2,2)]), fill=False, ls='solid')) #ok
pylab.gca().add_patch(PathPatch(Path([(3,2), (2,3)]), fill=False, ls='None')) # !!! ERROR
pylab.show()

the exact error message:
File "...\site-packages\matplotlib\backend_bases.py", line 1064, in set_linestyle
raise ValueError('Unrecognized linestyle: %s' % str(style))
ValueError: Unrecognized linestyle: None

version: matplotlib 1.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions