Skip to content
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

[FEATURE] Add "dot" marker variants #9863

Closed
BenPortner opened this issue Apr 1, 2020 · 7 comments · Fixed by #9905
Closed

[FEATURE] Add "dot" marker variants #9863

BenPortner opened this issue Apr 1, 2020 · 7 comments · Fixed by #9905

Comments

@BenPortner
Copy link

BenPortner commented Apr 1, 2020

Dear bokeh developers,

there are _cross versions of circle, square, and diamond. But not for triangle. I tried to add a triangle_cross marker to my plot and got an error. Is there a particular reason for this and if no, could you add it?

Keep up the good work!
Ben

@bryevdv
Copy link
Member

bryevdv commented Apr 1, 2020

@BenPortner Do you have examples of this in other libraries? cross was added to circle, square, and diamond because the obvious symmetry correspondences. Are you really just wanting to put a + on top of a triangle? If so it might just make sense to make two calls, to triangle and cross yourself.

@BenPortner
Copy link
Author

BenPortner commented Apr 1, 2020

@bryevdv I don't know if other libraries implement a triangle_cross. It would be nice to have though. I am using transformations to adapt the marker style depending on categorical values in my ColumnDataSource. With marker and color, one can easily create bivariate scatter plots. I was intending to use the _cross as workaround to create trivariate scatter plots: marker, color, cross/no cross. A bit like a factor_hatch transform for scatter plots. However, right now my workaround only works if one uses less than four markers: circle, square, and diamond.

Of course, one can always plot multiple markers on top of each other. But this is not supported in the scatter convenience function. Instead, one would have to go and manually map column values to (multiple) markers and colors.

@bryevdv
Copy link
Member

bryevdv commented Apr 7, 2020

@BenPortner I can't find any evidence of a triangle cross marker in other libraries:

And I am fairly certain the reason for that is that it would be both visually unappealing due to lack of symmetry, but also not efficacious from a vis standpoint. So I am not inclined to forge new ground here.

Personally, I think trying to encode this much into visual marker appearance makes a plot difficult to read and interpret. Setting aside my own opinions, however, we could consider adopting the "dot" variants that plotly shows. Those have an unambiguous application to circle, square, diamond, triangle, and hexagon. Would that be acceptable? (and would you be interested to work on the issue with some guidance/direction?)

@bryevdv bryevdv removed the TRIAGE label Apr 7, 2020
@BenPortner
Copy link
Author

BenPortner commented Apr 7, 2020

Sure, the -dot variants would work just as well. How much work would you expect this to be? If it's not too much I can give it a try.

@bryevdv
Copy link
Member

bryevdv commented Apr 7, 2020

@BenPortner Here is a recent PR that added support for a hexagon marker (including docs and examples):

https://github.com/bokeh/bokeh/pull/7658/files

All of the _dot variants would be similar to that (and even more similar to each other) so I think adding them all in one PR would be the most efficient.

@bryevdv bryevdv changed the title [FEATURE] Marker 'triangle_cross" [FEATURE] Add "dot" marker variants Apr 27, 2020
@bryevdv bryevdv added this to the 2.1 milestone Apr 27, 2020
@bryevdv bryevdv mentioned this issue Apr 27, 2020
3 tasks
@bryevdv
Copy link
Member

bryevdv commented Apr 27, 2020

@BenPortner I am taking care of this in #9905

@BenPortner
Copy link
Author

BenPortner commented Apr 27, 2020

Very nice @bryevdv!!! Love the new markers. Sorry that I didn't get around to doing it myself. I hope I can contribute something to bokeh in the future because I really love it. Keep up the good work, guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants