Skip to content

Proportional symbol mark? #41

@Fil

Description

@Fil

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions