From e845d5abf94159575a37df1ff4e5561f73663900 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:01:30 +0100 Subject: [PATCH] DOC: Minor improvements on VPacker, HPacker, PaddedBox docs --- lib/matplotlib/offsetbox.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/lib/matplotlib/offsetbox.py b/lib/matplotlib/offsetbox.py index 91858c23ad62..7b767ea5e9a0 100644 --- a/lib/matplotlib/offsetbox.py +++ b/lib/matplotlib/offsetbox.py @@ -436,6 +436,14 @@ class VPacker(PackerBase): """ VPacker packs its children vertically, automatically adjusting their relative positions at draw time. + + .. code-block:: none + + +---------+ + | Child 1 | + | Child 2 | + | Child 3 | + +---------+ """ def _get_bbox_and_child_offsets(self, renderer): @@ -468,6 +476,12 @@ class HPacker(PackerBase): """ HPacker packs its children horizontally, automatically adjusting their relative positions at draw time. + + .. code-block:: none + + +-------------------------------+ + | Child 1 Child 2 Child 3 | + +-------------------------------+ """ def _get_bbox_and_child_offsets(self, renderer): @@ -498,6 +512,26 @@ class PaddedBox(OffsetBox): The `.PaddedBox` contains a `.FancyBboxPatch` that is used to visualize it when rendering. + + .. code-block:: none + + +----------------------------+ + | | + | | + | | + | <--pad--> Artist | + | ^ | + | pad | + | v | + +----------------------------+ + + Attributes + ---------- + pad : float + The padding in points. + patch : `.FancyBboxPatch` + When *draw_frame* is True, this `.FancyBboxPatch` is made visible and + creates a border around the box. """ def __init__(self, child, pad=0., *, draw_frame=False, patch_attrs=None): pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy