custom symbol, second patch

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 :frowning: 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.png

custom_symbol2a.eps (158 KB)

May I ask again for hints ???

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 :frowning: So it seems that it is
an issue of rounding to int ???

The basic question is: is there a way to ensure that a line is drawn
with a fixed length irrespective of location and direction of the line.

I really would like to add more features (line-style symbols for
scatter), but the actual problem makes the patch embryonic ...

Manuel