genome_spy.FacetFieldDef

class genome_spy.FacetFieldDef(description=Undefined, domain=Undefined, field=Undefined, header=Undefined, sort=Undefined, title=Undefined, **kwds)View on GitHub

Bases: GenomeSpySchema

Generated wrapper for FacetFieldDef.

Methods

copy(*[, deep])

Return a copy with optional keyword updates.

description(value)

Return a copy with description updated.

domain([value, expr])

Return a copy with a ExprRef domain.

field(value)

Return a copy with field updated.

header([value, align, anchor, angle, ...])

Return a copy with a FacetHeader header.

resolve_references()

Return this class schema with referenced properties merged in.

sort(value)

Return a copy with sort updated.

title([value, align, anchor, angle, ...])

Return a copy with a Title title.

to_dict(*[, validate])

Serialize this schema wrapper to a JSON-compatible dictionary.

to_json(*[, validate])

Serialize this schema wrapper to formatted JSON.

validate(instance)

Validate an instance against this wrapper's schema.

description(value)View on GitHub

Return a copy with description updated.

domain(value=Undefined, /, *, expr=Undefined)View on GitHub

Return a copy with a ExprRef domain.

Parameters:

expr (str) – The expression string.

field(value)View on GitHub

Return a copy with field updated.

header(value=Undefined, /, *, align=Undefined, anchor=Undefined, angle=Undefined, baseline=Undefined, color=Undefined, dx=Undefined, dy=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, format=Undefined, frame=Undefined, labels=Undefined, offset=Undefined, orient=Undefined, reserve=Undefined, style=Undefined, zindex=Undefined)View on GitHub

Return a copy with a FacetHeader header.

Parameters:
  • align (Align_T) – Horizontal text alignment for title text. One of "left", "center", or "right".

  • anchor (TitleAnchor_T) – The anchor position for placing the title and subtitle text. One of "start", "middle", or "end". For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.

  • angle (float | ExprRef | dict[str, Any]) – Angle in degrees of title and subtitle text.

  • baseline (Baseline_T) – Vertical text baseline for title and subtitle text. One of "alphabetic" (default), "top", "middle", or "bottom".

  • color (str | ExprRef | dict[str, Any]) – Text color for title text.

  • dx (float) – Delta offset for title and subtitle text x-coordinate.

  • dy (float) – Delta offset for title and subtitle text y-coordinate.

  • font (str) – Font name for title text.

  • fontSize (float | ExprRef | dict[str, Any]) – Font size in pixels for title text.

  • fontStyle (FontStyle_T) – Font style for title text.

  • fontWeight (FontWeight_T) – Font weight for title text. This can be either a string (e.g "bold", "normal") or a number (100, 200, 300, …, 900 where "normal" = 400 and "bold" = 700).

  • format (str) – D3 number format for numeric category labels, for example ".1f" or ",.0f". String and boolean categories retain their original labels.

  • frame (TitleFrame_T) – The reference frame for the title anchor. "group" anchors the title along the plot area. "bounds" anchors the title along the full bounds, including axes, legends, and other reserved space. __Default value:__ "group"

  • labels (bool) – Whether category labels are shown. Hidden labels reserve no space. __Default value:__ true

  • offset (float) – The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.

  • orient (TitleOrient_T) – Default title orientation ("none", "top", "bottom", "left", or "right")

  • reserve (bool) – Whether the title reserves layout space outside the plot area. Reserved titles are placed outside axes, legends, and other guide space on the same side. Setting this to false lets the title render without affecting layout, enabling wilder layouts where titles may overlap nearby content. __Default value:__ true

  • style (str | Sequence[str]) – A mark style property to apply to the title text mark. If not specified, a default style of "group-title" is applied.

  • zindex (float) – Z-order of the title relative to the view content. Values greater than 0 render after the view marks. Values less than or equal to 0 render before the marks. __Default value:__ 1

sort(value)View on GitHub

Return a copy with sort updated.

title(value=Undefined, /, *, align=Undefined, anchor=Undefined, angle=Undefined, baseline=Undefined, color=Undefined, dx=Undefined, dy=Undefined, font=Undefined, fontSize=Undefined, fontStyle=Undefined, fontWeight=Undefined, frame=Undefined, offset=Undefined, orient=Undefined, reserve=Undefined, style=Undefined, subtitle=Undefined, subtitleColor=Undefined, subtitleFont=Undefined, subtitleFontSize=Undefined, subtitleFontStyle=Undefined, subtitleFontWeight=Undefined, subtitlePadding=Undefined, text=Undefined, zindex=Undefined)View on GitHub

Return a copy with a Title title.

Parameters:
  • align (Align_T) – Horizontal text alignment for title text. One of "left", "center", or "right".

  • anchor (TitleAnchor_T) – The anchor position for placing the title and subtitle text. One of "start", "middle", or "end". For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.

  • angle (float | ExprRef | dict[str, Any]) – Angle in degrees of title and subtitle text.

  • baseline (Baseline_T) – Vertical text baseline for title and subtitle text. One of "alphabetic" (default), "top", "middle", or "bottom".

  • color (str | ExprRef | dict[str, Any]) – Text color for title text.

  • dx (float) – Delta offset for title and subtitle text x-coordinate.

  • dy (float) – Delta offset for title and subtitle text y-coordinate.

  • font (str) – Font name for title text.

  • fontSize (float | ExprRef | dict[str, Any]) – Font size in pixels for title text.

  • fontStyle (FontStyle_T) – Font style for title text.

  • fontWeight (FontWeight_T) – Font weight for title text. This can be either a string (e.g "bold", "normal") or a number (100, 200, 300, …, 900 where "normal" = 400 and "bold" = 700).

  • frame (TitleFrame_T) – The reference frame for the title anchor. "group" anchors the title along the plot area. "bounds" anchors the title along the full bounds, including axes, legends, and other reserved space. __Default value:__ "group"

  • offset (float) – The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.

  • orient (TitleOrient_T) – Default title orientation ("none", "top", "bottom", "left", or "right")

  • reserve (bool) – Whether the title reserves layout space outside the plot area. Reserved titles are placed outside axes, legends, and other guide space on the same side. Setting this to false lets the title render without affecting layout, enabling wilder layouts where titles may overlap nearby content. __Default value:__ true

  • style (str | Sequence[str]) – A mark style property to apply to the title text mark. If not specified, a default style of "group-title" is applied.

  • subtitle (str | ExprRef | dict[str, Any]) – The subtitle text.

  • subtitleColor (str | ExprRef | dict[str, Any]) – Text color for subtitle text.

  • subtitleFont (str) – Font name for subtitle text.

  • subtitleFontSize (float | ExprRef | dict[str, Any]) – Font size in pixels for subtitle text.

  • subtitleFontStyle (FontStyle_T) – Font style for subtitle text.

  • subtitleFontWeight (FontWeight_T) – Font weight for subtitle text. This can be either a string (e.g "bold", "normal") or a number (100, 200, 300, …, 900 where "normal" = 400 and "bold" = 700).

  • subtitlePadding (float) – Padding in pixels between title and subtitle text. __Default value:__ 3

  • text (str | ExprRef | dict[str, Any]) – The title text.

  • zindex (float) – Z-order of the title relative to the view content. Values greater than 0 render after the view marks. Values less than or equal to 0 render before the marks. __Default value:__ 1

copy(*, deep=True, **kwds)View on GitHub

Return a copy with optional keyword updates.

classmethod resolve_references()View on GitHub

Return this class schema with referenced properties merged in.

to_dict(*, validate=True)View on GitHub

Serialize this schema wrapper to a JSON-compatible dictionary.

to_json(*, validate=True)View on GitHub

Serialize this schema wrapper to formatted JSON.

classmethod validate(instance)View on GitHub

Validate an instance against this wrapper’s schema.