I've created a further patch concerning custom symbols. The patch is
attached, as well as an example and the script producing it.
First what it does:
- you can now create custom line-symbols, which is useful to create e.g.
S-shaped symbols, see example:
pylab.scatter(x,y,s=120,marker=(verts,2))
- you can now create asterisk-like symbols
pylab.scatter(x,y,s=80,marker=(5,2))
Additionally I've corrected the scaling of custom verts.
However, there is problem with the asterisk symbols I'm not sure how to
solve, and I ask for your advice!!! As you can see in the attached
example output, custom_symbol2a.png, the length of the arms of the
asterisk-symbol appear different even so have numerically all the same
length. An asterisk-symbol is drawn by connecting the origin (0,0) with
one end of an arm, e.g. (1,0) and again back to the origin (0,0), then
to the next end of an arm and so on.
- Is there a better way to do this?
- And is there a way to avoid output artefacts like those in the example
attached ?
The artefact seems to be present for a pixel-devices only (like .png)
but not for a vector-drawing-device like eps So it seems that it is
an issue of rounding to int ???
Manuel
custom_symbol2.patch (7.39 KB)
custom_symbol2.py (676 Bytes)
custom_symbol2a.eps (158 KB)