ferrum.layer¶
Layer descriptor for multi-mark charts.
Internal layer wrapper used by composite-mark expansion.
Layer ¶
Single rendering layer inside a multi-layer Chart.
Most multi-layer charts are built via the + operator on two Chart
instances (chart1 + chart2). Direct construction of Layer objects
is rarely needed outside of ferrum internals and composite-mark expansion
code.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
object
|
DataFrame or Arrow-compatible object for this layer. When |
None
|
mark
|
str or MarkSpec
|
Mark type string (e.g. |
None
|
encoding
|
dict
|
Mapping of channel names to |
None
|
transforms
|
list
|
Sequence of transform objects applied to this layer's data before rendering. Defaults to an empty list when omitted. |
None
|
mark_kwargs
|
dict
|
Extra keyword arguments forwarded to the mark renderer (e.g.
|
None
|
Examples:
>>> from ferrum.layer import Layer
>>> layer = Layer(mark="text", encoding={"x": "x", "y": "y"}, mark_kwargs={"dx": 5})