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

Skip to content

Commit c611877

Browse files
committed
Basic changes
1 parent dcd55aa commit c611877

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

lib/matplotlib/sankey.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,10 @@ def __init__(self, ax=None, scale=1.0, unit='', format='%G', gap=0.25,
8484
The physical unit associated with the flow quantities. If *unit*
8585
is None, then none of the quantities are labeled.
8686
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.
87+
A Python number formatting string or callable used to label the
88+
flows with their quantities. If a format string is given, the
89+
label will be `format % quantity``. If a callable is given, it
90+
will be called.
9091
gap : float
9192
Space between paths that break in/break away to/from the top or
9293
bottom.
@@ -739,13 +740,13 @@ def _get_angle(a, r):
739740
if label is None or angle is None:
740741
label = ''
741742
elif self.unit is not None:
742-
743743
if isinstance(self.format, str):
744744
quantity = self.format % abs(number) + self.unit
745745
elif callable(self.format):
746-
quantity = self.format(100. * abs(number))
746+
quantity = self.format(abs(number))
747747
else:
748-
raise TypeError('format must be callable or a format string')
748+
raise TypeError(
749+
'format must be callable or a format string')
749750
if label != '':
750751
label += "\n"
751752
label += quantity

0 commit comments

Comments
 (0)