Documentation
¶
Overview ¶
Package facet splits a dataset into subsets for "small multiple" panel layouts. Faceting is a core component of the Grammar of Graphics, allowing the same plot specification to be repeated across levels of a categorical variable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFacetConfig = errors.New("facet: invalid configuration")
ErrFacetConfig is returned for invalid facet configuration.
Functions ¶
This section is empty.
Types ¶
type Facet ¶
type Facet interface {
// Split partitions the dataset into panels. Each panel has a label
// and a filtered subset of the data.
Split(ctx context.Context, ds dataset.Dataset) ([]Panel, error)
// GridDims returns the (rows, cols) grid dimensions for layout.
// For Wrap, this is computed from the number of panels and nCols.
GridDims(nPanels int) (rows, cols int)
// String returns a human-readable description.
String() string
}
Facet defines how a dataset is split into panels for small-multiple layouts.
Click to show internal directories.
Click to hide internal directories.