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

Skip to content

Commit ac2abfa

Browse files
committed
Edits for formatting / indentation
1 parent c3207eb commit ac2abfa

File tree

1 file changed

+31
-22
lines changed

1 file changed

+31
-22
lines changed

examples/api/sankey_basics.py

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
###############################################################################
1515
# Example 1 -- Mostly defaults
16+
#
1617
# This demonstrates how to create a simple diagram by implicitly calling the
1718
# Sankey.add() method and by appending finish() to the call to the class.
1819

@@ -23,24 +24,28 @@
2324

2425
###############################################################################
2526
# Notice:
26-
# 1. Axes weren't provided when Sankey() was instantiated, so they were
27-
# created automatically.
28-
# 2. The scale argument wasn't necessary since the data was already
29-
# normalized.
30-
# 3. By default, the lengths of the paths are justified.
27+
#
28+
# 1. Axes weren't provided when Sankey() was instantiated, so they were
29+
# created automatically.
30+
# 2. The scale argument wasn't necessary since the data was already
31+
# normalized.
32+
# 3. By default, the lengths of the paths are justified.
33+
3134

3235
###############################################################################
3336
# Example 2
37+
#
3438
# This demonstrates:
35-
# 1. Setting one path longer than the others
36-
# 2. Placing a label in the middle of the diagram
37-
# 3. Using the scale argument to normalize the flows
38-
# 4. Implicitly passing keyword arguments to PathPatch()
39-
# 5. Changing the angle of the arrow heads
40-
# 6. Changing the offset between the tips of the paths and their labels
41-
# 7. Formatting the numbers in the path labels and the associated unit
42-
# 8. Changing the appearance of the patch and the labels after the figure is
43-
# created
39+
#
40+
# 1. Setting one path longer than the others
41+
# 2. Placing a label in the middle of the diagram
42+
# 3. Using the scale argument to normalize the flows
43+
# 4. Implicitly passing keyword arguments to PathPatch()
44+
# 5. Changing the angle of the arrow heads
45+
# 6. Changing the offset between the tips of the paths and their labels
46+
# 7. Formatting the numbers in the path labels and the associated unit
47+
# 8. Changing the appearance of the patch and the labels after the figure is
48+
# created
4449

4550
fig = plt.figure()
4651
ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[],
@@ -60,18 +65,22 @@
6065

6166
###############################################################################
6267
# Notice:
63-
# 1. Since the sum of the flows is nonzero, the width of the trunk isn't
64-
# uniform. If verbose.level is helpful (in matplotlibrc), a message is
65-
# given in the terminal window.
66-
# 2. The second flow doesn't appear because its value is zero. Again, if
67-
# verbose.level is helpful, a message is given in the terminal window.
68+
#
69+
# 1. Since the sum of the flows is nonzero, the width of the trunk isn't
70+
# uniform. If verbose.level is helpful (in matplotlibrc), a message is
71+
# given in the terminal window.
72+
# 2. The second flow doesn't appear because its value is zero. Again, if
73+
# verbose.level is helpful, a message is given in the terminal window.
74+
6875

6976
###############################################################################
7077
# Example 3
78+
#
7179
# This demonstrates:
72-
# 1. Connecting two systems
73-
# 2. Turning off the labels of the quantities
74-
# 3. Adding a legend
80+
#
81+
# 1. Connecting two systems
82+
# 2. Turning off the labels of the quantities
83+
# 3. Adding a legend
7584

7685
fig = plt.figure()
7786
ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[], title="Two Systems")

0 commit comments

Comments
 (0)