-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Milestone
Description
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
Labels
No labels