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

preattentive symbols #189

Merged
merged 8 commits into from
Jan 7, 2022
Merged

preattentive symbols #189

merged 8 commits into from
Jan 7, 2022

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Jan 6, 2022

Supersedes #176. I adjusted the implementations proposed by @hemanrobinson for style, and to fit empirically the behavior of symbolCircle when using a stroke width of 1.5px and round line caps. (See notebook.) I also updated some old D3 code for modern JavaScript style. Adds the following new symbols:

  • symbolAsterisk
  • symbolDiamond2
  • symbolPlus
  • symbolSquare2
  • symbolTriangle2
  • symbolX

In addition, adds two new sets of symbols:

  • symbolsFill
  • symbolsStroke

The symbolsFill is equivalent to and replaces symbols, which is now deprecated.

I considered the following alternative names:

  • symbolTimes instead of symbolX
  • symbolCross2 instead of symbolPlus
  • symbolSquare3 instead of symbolDiamond2

Ultimately I don’t think the names matter too much as I expect most often the symbols will be chosen automatically automatically by Plot (using symbolsStroke—though we could perhaps make Plot smart enough to chose symbolsStroke or SymbolsFill depending on whether a fill or stroke channel is present).

TODO

  • documentation
  • tests

hemanrobinson and others added 2 commits March 28, 2021 11:23
Symbols with preattentive features aid pattern detection and reduce overlap.  This symbol set implements ideas of Cleveland, Wilkinson, and others, and has been tested for popularity and discriminability, and adjusted for approximately equal weight.

Many products support up to a dozen different symbol sets.  This is analogous to multiple color schemes, such as Dr. Cindy Brewer's recently supported in d3.

Not knowing d3's plans for symbol sets, I've only made a bare attempt at integrating these, but would be happy to continue this work along whatever lines are appropriate.
@mbostock mbostock mentioned this pull request Jan 6, 2022
@mbostock mbostock requested a review from Fil January 6, 2022 19:35
@mbostock mbostock mentioned this pull request Jan 6, 2022
7 tasks
Copy link
Member

@Fil Fil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pre-approving if you want to go fast :)

good night

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
mbostock and others added 2 commits January 7, 2022 05:52
Co-authored-by: Philippe Rivière <fil@rezo.net>
Co-authored-by: Philippe Rivière <fil@rezo.net>
@mbostock mbostock merged commit 1bf1f67 into main Jan 7, 2022
@mbostock mbostock deleted the mbostock/preattentive-symbols branch January 7, 2022 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants