8000 rephrase some of the comments · matplotlib/matplotlib@ce43564 · GitHub
[go: up one dir, main page]

Skip to content

Commit ce43564

Browse files
committed
rephrase some of the comments
1 parent 883c314 commit ce43564

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/api/two_scales.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@
2222
data1 = np.exp(t)
2323
data2 = np.sin(2 * np.pi * t)
2424

25-
# Create twin axes and plot the mock data onto them
25+
# Create a pair of twin axes (ax1 and ax2) that share the same x-axis
2626
fig, ax1 = plt.subplots()
27-
ax2 = ax1.twinx() # instantiate a second axes that shares the same x-axis
27+
ax2 = ax1.twinx() # create the second `Axes` instance
2828

29+
# Plot a different set of data on each axes
2930
for ax, data, c in ((ax1, data1, "red"), (ax2, data2, "blue")):
3031
ax.plot(t, data, color=c)
31-
# Color the y-axis (both label and tick labels)
32+
# Color the y-axis (both label and tick labels) accordingly to the data
3233
ax.yaxis.label.set_color(c)
3334
for tl in ax.get_yticklabels():
3435
tl.set_color(c)

0 commit comments

Comments
 (0)
0