# `Visualize.Shape.Symbol`
[🔗](https://github.com/dcoai/Visualize/blob/v0.8.3/lib/visualize/shape/symbol.ex#L1)

Symbol generator for categorical point marks.

Provides various symbol shapes commonly used in scatter plots
and legends to distinguish categories.

## Examples

    symbol = Visualize.Shape.Symbol.new()
      |> Visualize.Shape.Symbol.type(:circle)
      |> Visualize.Shape.Symbol.size(64)

    path_data = Visualize.Shape.Symbol.generate(symbol)

# `symbol_type`

```elixir
@type symbol_type() ::
  :circle | :cross | :diamond | :square | :star | :triangle | :wye
```

# `t`

```elixir
@type t() :: %Visualize.Shape.Symbol{
  size: number() | (any() -&gt; number()),
  type: symbol_type() | (any() -&gt; symbol_type())
}
```

# `generate`

```elixir
@spec generate(t(), any()) :: String.t()
```

Generates the SVG path data string.

Note: For backend-agnostic usage, prefer `generate_path/2`
and render with your chosen backend.

# `generate_path`

```elixir
@spec generate_path(t(), any()) :: Visualize.IR.Path.t()
```

Generates a Path struct

# `new`

```elixir
@spec new() :: t()
```

Creates a new symbol generator

# `size`

```elixir
@spec size(t(), number() | (any() -&gt; number())) :: t()
```

Sets the symbol size in square pixels.

For a circle, this is the area. For other symbols, the bounding box
area is approximately this size.

# `type`

```elixir
@spec type(t(), symbol_type() | (any() -&gt; symbol_type())) :: t()
```

Sets the symbol type

# `types`

```elixir
@spec types() :: [symbol_type()]
```

Returns all available symbol types

---

*Consult [api-reference.md](api-reference.md) for complete listing*
