Adding 7 new markers#222
Conversation
…gon1 and hexxagon2, and pentagon.
|
At first sight, the failures seem to have nothing to do with my code so I won't address them in this PR. |
|
Thanks for the contributions. Looks like failures are in the svg libraries, so definitely unrelated to this. Minor criticisms: your hexagons are sufficiently distorted that it bugs me, so you might want to fix. See matplotlib for better ones https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/markers.py#L592. Similarly the pentagons are a bit off in their proportions. In general for an Finally, matplotlib's star marker is an actual 5-pointed star: ⭐ I think it makes sense to follow suit, so I'd either remove star from this PR, or follow suit. Tests would be nice, but I'm not going to insist :) |
|
Thanks for the feedback @corranwebster . Agreed with all of the comments and I took the time to do the star properly: Updated plot looks like: |
| # How this marker is to be stroked. (Overrides AbstractMarker.) | ||
| draw_mode = FILL_STROKE | ||
| # Do not render anti-aliased. (Overrides AbstractMarker.) | ||
| antialias = False |
There was a problem hiding this comment.
I don't think that we want this: the markers that have this set have corresponding Kiva versions implemented by Agg in C++ without aliasing, so this is to give pixel-to-pixel similarity between the two ways of drawing between different backends. For these, we have no corresponding Agg versions (unless you want to expose the ones here: https://github.com/enthought/enable/blob/dddfac16132051e40d93485333f1c13ea7964631/kiva/agg/agg-24/include/agg_renderer_markers.h by adding them here:
enable/kiva/agg/src/constants.i
Line 57 in dddfac1
They will draw slightly slower, but look much nicer if antialias is True.
|
One last comment above. There are native Agg versions of some of these, so if you are feeling enthusiastic you can expose them and they will render much faster, but that could be a separate PR. The markers look much nicer. |
|
Thanks for the antialiasing comment. Fixed. Thanks for the pointers into Kiva. Will have to delay diving into Kiva and Agg for the future... |
|
Excuse me for lurking, but I seem to recall trying to get the Agg markers working many years ago, but they didn't work for some reason. It was probably 6 years ago, so I don't recall the exact reason, though I do know I tried :) |
|
Thanks for your lurking and the information @brycehendrix . |

The new markers proposed are: left and right triangle, star, cross-plus, hexagon1 and hexagon2, and pentagon.
To try them out, you can run:
On OSX, it is giving me:

Feedback requested.