matplotlib/matplotlib — Issue #631: Update on Documentation
Author: 2sn
Created: 2011-12-19 15:57:54+00:00
State: open

1) in the table for marker vertices it states

http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.lines.Line2D.set_marker

verts	a list of (x, y) pairs in range (0, 1)

it really should be just normalized or abs(1), (0,0) being center, and
hence the (x,y) values should be in the range (-1,+1). Would be good to
add an example

x=np.linspace(0,1,10)**2
plot(x,c='r',marker=((-1.,-1),(1.,-1),(1.,1.),(-1,1.),(-1,-1)),ms=10)

2) the source also support to just provide a path as a marker, which (a)
is cool, and (b) seemed natural as internal many things are done a
paths, and even complies paths are generated from the $...$ syntax math.
In any case, this should be added to the documentation for allowed markers

path	a matplotlib.path.Path object

import matplotlib.path as path
x = np.linspace(0,1,10)**2
p = path.Path(((-1.,-1),(1.,-1),(1.,1.),(-1,1.),(-1,-1)))
plot(x,c='r',marker=p,ms=10)

or a cool example that you may want tot add to the library...

import matplotlib.path as path

# define codes
P = path.Path
Pm = P.MOVETO
Pl = P.LINETO
Pc = P.CLOSEPOLY
c = [Pm] + [Pl]*3 + [Pc]
cx=c*2

# define basic path
r=np.array(((-1.,-1),(1.,-1),(1.,1.),(-1,1.),(-1,-1)))
# we add second closed path of half size but reverse parity
rh=0.5*r[::-1]
rx = np.vstack((r,rh))
p = path.Path(rx,codes=cx)

x = np.linspace(0,1,10)**2
plot(x,c='r',marker=p,ms=10)

PS - I guess I need to figure out how to do such updates w/o requesting
action from the lest eventually.

Just to emphasize (2a): COOL!!!