Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dcd55aa

Browse files
committed
Basic changes
1 parent 68f91d5 commit dcd55aa

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

lib/matplotlib/sankey.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ def __init__(self, ax=None, scale=1.0, unit='', format='%G', gap=0.25,
8383
unit : str
8484
The physical unit associated with the flow quantities. If *unit*
8585
is None, then none of the quantities are labeled.
86-
format : str
87-
A Python number formatting string to be used in labeling the flow
88-
as a quantity (i.e., a number times a unit, where the unit is
89-
given).
86+
format : str or callable
87+
A Python number formatting string or callable used to label the flows
88+
with their quantities. If a format string is given, the label will be
89+
``format % quantity``. If a callable is given, it will be called.
9090
gap : float
9191
Space between paths that break in/break away to/from the top or
9292
bottom.
@@ -739,8 +739,7 @@ def _get_angle(a, r):
739739
if label is None or angle is None:
740740
label = ''
741741
elif self.unit is not None:
742-
if self.format is None:
743-
self.format = '%G'
742+
744743
if isinstance(self.format, str):
745744
quantity = self.format % abs(number) + self.unit
746745
elif callable(self.format):

0 commit comments

Comments
 (0)