Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf2717a5

Browse files
authored
Merge pull request#29389 from timhoffm/doc-offsetbox
DOC: Minor improvements on VPacker, HPacker, PaddedBox docs
2 parents2f75888 +e845d5a commitf2717a5

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

‎lib/matplotlib/offsetbox.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,14 @@ class VPacker(PackerBase):
436436
"""
437437
VPacker packs its children vertically, automatically adjusting their
438438
relative positions at draw time.
439+
440+
.. code-block:: none
441+
442+
+---------+
443+
| Child 1 |
444+
| Child 2 |
445+
| Child 3 |
446+
+---------+
439447
"""
440448

441449
def_get_bbox_and_child_offsets(self,renderer):
@@ -468,6 +476,12 @@ class HPacker(PackerBase):
468476
"""
469477
HPacker packs its children horizontally, automatically adjusting their
470478
relative positions at draw time.
479+
480+
.. code-block:: none
481+
482+
+-------------------------------+
483+
| Child 1 Child 2 Child 3 |
484+
+-------------------------------+
471485
"""
472486

473487
def_get_bbox_and_child_offsets(self,renderer):
@@ -498,6 +512,26 @@ class PaddedBox(OffsetBox):
498512
499513
The `.PaddedBox` contains a `.FancyBboxPatch` that is used to visualize
500514
it when rendering.
515+
516+
.. code-block:: none
517+
518+
+----------------------------+
519+
| |
520+
| |
521+
| |
522+
| <--pad--> Artist |
523+
| ^ |
524+
| pad |
525+
| v |
526+
+----------------------------+
527+
528+
Attributes
529+
----------
530+
pad : float
531+
The padding in points.
532+
patch : `.FancyBboxPatch`
533+
When *draw_frame* is True, this `.FancyBboxPatch` is made visible and
534+
creates a border around the box.
501535
"""
502536

503537
def__init__(self,child,pad=0.,*,draw_frame=False,patch_attrs=None):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp