10000 Fixed typos in Sankey · matplotlib/matplotlib@11737f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 11737f3

Browse files
committed
Fixed typos in Sankey
1 parent f813278 commit 11737f3

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

lib/matplotlib/sankey.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# http://matplotlib.org/examples/api/sankey_demo_old.html
1313
# Modifications by Kevin Davies (kld@alumni.carnegiemellon.edu) 6/3/2011:
1414
# --Used arcs for the curves (so that the widths of the paths are uniform)
15-
# --Converted the function to a class and created methods to join
16-
# multiple simple Sankey diagrams
15+
# --Converted the function to a class and created methods to join multiple
16+
# simple Sankey diagrams
1717
# --Provided handling for cases where the total of the inputs isn't 100
1818
# Now, the default layout is based on the assumption that the inputs sum to
1919
# 1. A scaling parameter can be used in other cases.
@@ -29,7 +29,7 @@
2929
# inputs/outputs are now specified via an orientation of 0, and there may
3030
# be several of each.
3131
# --Added assertions to catch common calling errors
32-
# -Added the physical unit as a string argument to be used in the labels, so
32+
# --Added the physical unit as a string argument to be used in the labels, so
3333
# that the values of the flows can usually be applied automatically
3434
# --Added an argument for a minimum magnitude below which flows are not shown
3535
# --Added a tapered trunk in the case that the flows do not sum to 0
@@ -395,10 +395,10 @@ def add(self, patchlabel='', flows=None, orientations=None, labels='',
395395
*orientations* == 0, inputs will break in from the
396396
left and outputs will break away to the right.
397397
*labels* list of specifications of the labels for the flows
398-
Each value may be None (no labels), '' (just label
399-
the quantities), or a labeling string. If a single
400-
value is provided, it will be applied to all flows.
401-
If an entry is a non-empty string, then the
398+
Each value may be *None* (no labels), '' (just
399+
label the quantities), or a labeling string. If a
400+
single value is provided, it will be applied to all
401+
flows. If an entry is a non-empty string, then the
402402
quantity for the corresponding flow will be shown
403403
below the string. However, if the *unit* of the
404404
main diagram is None, then quantities are never
@@ -417,7 +417,7 @@ def add(self, patchlabel='', flows=None, orientations=None, labels='',
417417
*connect* a (prior, this) tuple indexing the flow of the
418418
prior diagram and the flow of this diagram which
419419
should be connected
420-
If this is the first diagram or *prior* is None,
420+
If this is the first diagram or *prior* is *None*,
421421
*connect* will be ignored.
422422
*rotation* angle of rotation of the diagram [deg]
423423
*rotation* is ignored if this diagram is connected
@@ -460,7 +460,7 @@ def add(self, patchlabel='', flows=None, orientations=None, labels='',
460460
if rotation is None:
461461
rotation = 0
462462
else:
463-
# In the code below, angles are expressed in deg/90
463+
# In the code below, angles are expressed in deg/90.
464464
rotation /= 90.0
465465
if orientations is None:
466466
orientations = [0, 0]
@@ -741,10 +741,10 @@ def _get_angle(a, r):
741741
kwds = dict(s=patchlabel, ha='center', va='center')
742742
text = self.ax.text(*offset, **kwds)
743743
if False: # Debug
744-
print "llpath\n", llpath
745-
print "ulpath\n", self._revert(ulpath)
746-
print "urpath\n", urpath
747-
print "lrpath\n", self._revert(lrpath)
744+
print("llpath\n", llpath)
745+
print("ulpath\n", self._revert(ulpath))
746+
print("urpath\n", urpath)
747+
print("lrpath\n", self._revert(lrpath))
748748
xs, ys = zip(*vertices)
749749
self.ax.plot(xs, ys, 'go-')
750750
patch = PathPatch(Path(vertices, codes),
@@ -816,7 +816,7 @@ def finish(self):
816816
(DOWN), and an output from the top side will have
817817
an angle of 1 (UP). If a flow has been skipped
818818
(because its magnitude is less than *tolerance*),
819-
then its angle will be None.
819+
then its angle will be *None*.
820820
*tips* array in which each row is an [x, y] pair
821821
indicating the positions of the tips (or "dips") of
822822
the flow paths

0 commit comments

Comments
 (0)
0