render_facets
Mojo function 🡭
render_facets
fn def render_facets(plots: List[AnyChart], cols: Int, shared_y_scale: Bool = False, shared_x_scale: Bool = False, title: String = "") -> CanvasRender each of plots into its grid cell of a fresh Canvas sized from the plots (_require_uniform_size), plus the band a title reserves above them so the cells keep their own size, supersampled by plots[0].settings.theme.raster_supersample like render() (plots is a plain borrow – a copy is what actually gets the scale bump, so a temporary list literal binds fine). See _render_facets_generic for the cell-layout contract. cols is checked before anything else, since a non-positive value would divide by zero in the rows/canvas-size math.
Args:
- plots (
List[AnyChart]) - cols (
Int) - shared_y_scale (
Bool) - shared_x_scale (
Bool) - title (
String)
Returns:
Canvas
Raises:
fn def render_facets[*Cs: ChartLike](*charts: *Cs.values, *, cols: Int, shared_y_scale: Bool = False, shared_x_scale: Bool = False, title: String = "") -> Canvasrender_facets(plots, cols) for charts named one by one: render_facets(a, b, cols=2). Each is erased for the shared list.
Parameters:
- *Cs (
ChartLike)
Args:
- *charts (
*Cs.values) - cols (
Int) - shared_y_scale (
Bool) - shared_x_scale (
Bool) - title (
String)
Returns:
Canvas
Raises: