Skip to content
render_inset_svg

render_inset_svg

Mojo function 🡭

render_inset_svg

fn def render_inset_svg[B: ChartLike, I: ChartLike](base: B, inset: I, x: Float64, y: Float64, width: Float64, height: Float64) -> SvgCanvas

render_inset()’s counterpart for SvgCanvas: the same placement rule against the base’s plot rect, through render_svg()’s own helper.

Parameters:

  • B (ChartLike)
  • I (ChartLike)

Args:

  • base (B): The chart drawn first, at its own size.
  • inset (I): The chart drawn over it.
  • x (Float64): The inset’s left edge, as a fraction of the plot-rect width.
  • y (Float64): The inset’s top edge, as a fraction of the plot-rect height.
  • width (Float64): The inset’s width as a fraction of the plot-rect width.
  • height (Float64): The inset’s height as a fraction of the plot-rect height.

Returns:

SvgCanvas: The rendered figure.

Raises:

Error: As render_inset().