Skip to content

Commit ced35d1

Browse files
committed
pt not plt
1 parent cd9842d commit ced35d1

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

ot/plot.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
import numpy as np
7-
import matplotlib.pylab as plt
7+
import matplotlib.pylab as pl
88
from matplotlib import gridspec
99

1010

@@ -31,24 +31,24 @@ def plot1D_mat(a, b, M, title=''):
3131
xa = np.arange(na)
3232
xb = np.arange(nb)
3333

34-
ax1 = plt.subplot(gs[0, 1:])
35-
plt.plot(xb, b, 'r', label='Target distribution')
36-
plt.yticks(())
37-
plt.title(title)
34+
ax1 = pl.subplot(gs[0, 1:])
35+
pl.plot(xb, b, 'r', label='Target distribution')
36+
pl.yticks(())
37+
pl.title(title)
3838

39-
ax2 = plt.subplot(gs[1:, 0])
40-
plt.plot(a, xa, 'b', label='Source distribution')
41-
plt.gca().invert_xaxis()
42-
plt.gca().invert_yaxis()
43-
plt.xticks(())
39+
ax2 = pl.subplot(gs[1:, 0])
40+
pl.plot(a, xa, 'b', label='Source distribution')
41+
pl.gca().invert_xaxis()
42+
pl.gca().invert_yaxis()
43+
pl.xticks(())
4444

45-
plt.subplot(gs[1:, 1:], sharex=ax1, sharey=ax2)
46-
plt.imshow(M, interpolation='nearest')
47-
plt.axis('off')
45+
pl.subplot(gs[1:, 1:], sharex=ax1, sharey=ax2)
46+
pl.imshow(M, interpolation='nearest')
47+
pl.axis('off')
4848

49-
plt.xlim((0, nb))
50-
plt.tight_layout()
51-
plt.subplots_adjust(wspace=0., hspace=0.2)
49+
pl.xlim((0, nb))
50+
pl.tight_layout()
51+
pl.subplots_adjust(wspace=0., hspace=0.2)
5252

5353

5454
def plot2D_samples_mat(xs, xt, G, thr=1e-8, **kwargs):
@@ -78,5 +78,5 @@ def plot2D_samples_mat(xs, xt, G, thr=1e-8, **kwargs):
7878
for i in range(xs.shape[0]):
7979
for j in range(xt.shape[0]):
8080
if G[i, j] / mx > thr:
81-
plt.plot([xs[i, 0], xt[j, 0]], [xs[i, 1], xt[j, 1]],
82-
alpha=G[i, j] / mx, **kwargs)
81+
pl.plot([xs[i, 0], xt[j, 0]], [xs[i, 1], xt[j, 1]],
82+
alpha=G[i, j] / mx, **kwargs)

0 commit comments

Comments
 (0)