genome_spy.dynamic_opacity

genome_spy.dynamic_opacity(*, channel=Undefined, unitsPerPixel=Undefined, values=Undefined)View on GitHub

Create a zoom-dependent opacity definition.

Parameters:
  • channel (PrimaryPositionalChannel_T | Literal['auto']) – The positional channel whose scale domain controls the opacity. If set to "auto", both x and y scales may contribute. If omitted, x is used when available and y is used as a fallback.

  • unitsPerPixel (Sequence[float | ExprRef | dict[str, Any]]) – Opacity stops expressed as units (base pairs, for example) per pixel. The values must be positive. Each stop is paired with an opacity in values at the same index. Stops can be constants or expression references.

  • values (Sequence[float]) – Opacity values that match the given unitsPerPixel stops. Values outside the stop range are clamped to the nearest stop.