-
-
Notifications
You must be signed in to change notification settings - Fork 343
Open markers #4935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Open markers #4935
Conversation
Benchmark ResultsSHA: 6a4ccdaf873da0e0cf78042fc8a818d55e5e79fc Warning These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking. |
could we also do ?
|
@lazarusA sure why not :) or did you mean adding that as a test case? It's not different from any other markers ![]() |
oh, nice! if it works we don't need a test 😄 ! |
I saw and used quite a few open markers – in addition to these two, remember 45 deg tilted square More explicit support (this PR) would be nice – gives more control on the "stroke" width. |
Ok I've added a bunch of other markers, all implemented in the scaled cutout way currently. This is not perfect because the "stroke width" differs a bit depending on the angle of the lines, but I'm not motivated right now to do a better one. We can still do that later and I would consider the slight changes of widths suitable for a patch release then. |
any idea why WGLMakie would fail here @SimonDanisch or @ffreyer? |
Isn't this what you mentioned in #4829 as not working well for general shapes? Doesn't this approach mean that the strokewidth scales with markersize? I.e. if you wanted 2px strokewidth with N markersizes you'd need to produce N different markers? That sounds problematic with the finite amount of space in the texture atlas. Especially when strokewidth already exists. Maybe it would be better to do something like if user_strokecolor === automatic
backend_strokecolor = is_open_marker(user_marker) ? user_color : :black
else
backend_strokecolor = user_strokecolor
end after #4630? Another point - since all the other Bezier markers have a Symbol name associated with them, shouldn't these do too? I.e. |
Ah yeah nobody really reacted to that earlier issue with implementation ideas. But if you think a stroke version would be feasible, that might be an option, too. I mean both variants have their benefits, but a stroke is just easier to reason about as it's independent of markersize. On the other hand, the markers become slightly larger due to the stroke, in the current implementation the open markers are exactly as large as their closed counterparts. About the symbols, yeah I thought about that, too. I didn't do it because of the parameter, but in an earlier draft I had a way to specify the fraction via the name. Like |
Open markers are often recommended because they allow discriminating overlapping data points better than closed markers. Here I'm adding convenience functions that match
:circle
and:rect
markers with adjustable inner radius. I've not really seen many other open markers in the wild but more could be added later. One can also use stroked markers for the same effect, but for example in AoG, one can then not use the defaultcolor
mapping which is annoying when switching between markers.