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

Proportional symbol mark? #41

Closed
Fil opened this issue Dec 11, 2020 · 4 comments
Closed

Proportional symbol mark? #41

Fil opened this issue Dec 11, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@Fil
Copy link
Contributor

Fil commented Dec 11, 2020

Speaking in general, we have several possibilities for proportional symbols:

  • svg:circle is concise (and possibly the most cpu-efficient); scale with r/size.
  • svg:path + d3.symbol is useful for certain types of scatterplots, but difficult to extend; scale with transform:scale
  • svg:text + emoji works if we're careful to center the mark properly; scale with transform:scale

Note that svg:use + defs covers the three cases, and removes the difficulty of having to define complex symbols when we're not happy with the set in d3.symbols.
See https://observablehq.com/@fil/svg-use

So if we want a variant of Plot.dot that allows various symbols, I would try to code it with <use>. The range of the symbol scale is a list of objects that would have an id and be added to the defs, or a list of ids—but then how do we pass the objects themselves? The mark could default to <use href=#square>. And it would accept an orientation channel!

(discarding svg:polygon which has no advantage that I know of over svg:path.)

Fil added a commit that referenced this issue Dec 18, 2020

Verified

This commit was signed with the committer’s verified signature.
(#41)
Fil added a commit that referenced this issue Dec 18, 2020
@mbostock mbostock added the enhancement New feature or request label Feb 24, 2021
@Fil
Copy link
Contributor Author

Fil commented Feb 25, 2021

An experiment here: https://observablehq.com/@fil/plot-symbols

@Fil
Copy link
Contributor Author

Fil commented May 18, 2021

Linked to #170

@Fil
Copy link
Contributor Author

Fil commented Jun 15, 2021

See also the preattentive symbols by Heman Robinson https://observablehq.com/@heman/preattentive-symbols-176

@mbostock
Copy link
Member

mbostock commented Jan 8, 2022

Fixed in #652 #649.

@mbostock mbostock closed this as completed Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants