8000 Merge pull request #26349 from anntzer/sd · randomrahulm/matplotlib@fc3ba69 · GitHub
[go: up one dir, main page]

Skip to content

Commit fc3ba69

Browse files
authored
Merge pull request matplotlib#26349 from anntzer/sd
Tweak Sankey docs.
2 parents 476b1e6 + 9110c30 commit fc3ba69

File tree

1 file changed

+24
-32
lines changed

1 file changed

+24
-32
lines changed

lib/matplotlib/sankey.py

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(self, ax=None, scale=1.0, unit='', format='%G', gap=0.25,
4949
that there is consistent alignment and formatting.
5050
5151
In order to draw a complex Sankey diagram, create an instance of
52-
:class:`Sankey` by calling it without any kwargs::
52+
`Sankey` by calling it without any kwargs::
5353
5454
sankey = Sankey()
5555
@@ -109,8 +109,8 @@ def __init__(self, ax=None, scale=1.0, unit='', format='%G', gap=0.25,
109109
magnitude of the sum of connected flows cannot be greater than
110110
*tolerance*.
111111
**kwargs
112-
Any additional keyword arguments will be passed to :meth:`add`,
113-
which will create the first subdiagram.
112+
Any additional keyword arguments will be passed to `add`, which
113+
will create the first subdiagram.
114114
115115
See Also
116116
--------
@@ -780,35 +780,27 @@ def finish(self):
780780
Adjust the axes and return a list of information about the Sankey
781781
subdiagram(s).
782782
783-
Return value is a list of subdiagrams represented with the following
784-
fields:
785-
786-
=============== ===================================================
787-
Field Description
788-
=============== ===================================================
789-
*patch* Sankey outline (an instance of
790-
:class:`~matplotlib.patches.PathPatch`)
791-
*flows* values of the flows (positive for input, negative
792-
for output)
793-
*angles* list of angles of the arrows [deg/90]
794-
For example, if the diagram has not been rotated,
795-
an input to the top side will have an angle of 3
796-
(DOWN), and an output from the top side will have
797-
an angle of 1 (UP). If a flow has been skipped
798-
(because its magnitude is less than *tolerance*),
799-
then its angle will be *None*.
800-
*tips* array in which each row is an [x, y] pair
801-
indicating the positions of the tips (or "dips") of
802-
the flow paths
803-
If the magnitude of a flow is less the *tolerance*
804-
for the instance of :class:`Sankey`, the flow is
805-
skipped and its tip will be at the center of the
806-
diagram.
807-
*text* :class:`~matplotlib.text.Text` instance for the
808-
label of the diagram
809-
*texts* list of :class:`~matplotlib.text.Text` instances
810-
for the labels of flows
811-
=============== ===================================================
783+
Returns a list of subdiagrams with the following fields:
784+
785+
======== =============================================================
786+
Field Description
787+
======== =============================================================
788+
*patch* Sankey outline (a `~matplotlib.patches.PathPatch`).
789+
*flows* Flow values (positive for input, negative for output).
790+
*angles* List of angles of the arrows [deg/90].
791+
For example, if the diagram has not been rotated,
792+
an input to the top side has an angle of 3 (DOWN),
793+
and an output from the top side has an angle of 1 (UP).
794+
If a flow has been skipped (because its magnitude is less
795+
than *tolerance*), then its angle will be *None*.
796+
*tips* (N, 2)-array of the (x, y) positions of the tips (or "dips")
797+
of the flow paths.
798+
If the magnitude of a flow is less the *tolerance* of this
799+
`Sankey` instance, the flow is skipped and its tip will be at
800+
the center of the diagram.
801+
*text* `.Text` instance for the diagram label.
802+
*texts* List of `.Text` instances for the flow labels.
803+
======== =============================================================
812804
813805
See Also
814806
--------

0 commit comments

Comments
 (0)
0