render_tight_pdf
Mojo function 🡭
render_tight_pdf
fn def render_tight_pdf[C: ChartLike](plot: C) -> PdfCanvasrender_pdf() cropped to the figure’s ink, so the page is the figure rather than the figure plus its margins (#372).
The page shrinks with the crop, and one layout unit is still one point, so a cropped export is still physically specified – it is simply a smaller page.
Parameters:
- C (
ChartLike)
Args:
- plot (
C): The chart to render.
Returns:
PdfCanvas: A one-page PdfCanvas the size of the figure’s ink.
Raises:
Error: Whatever render_pdf() raises.