summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKilian Fatras <kilianfatras@Kilians-MacBook-Air.local>2019-07-24 18:46:44 +0200
committerKilian Fatras <kilianfatras@Kilians-MacBook-Air.local>2019-07-24 18:46:44 +0200
commit4709849bcc624d5e5c33755b997c56998f43d3e9 (patch)
treef31d041a828e80120ae40ff5ec951cfc003ebd61
parent5a6b226de20624b51c2ff98bc30e5611a7a788c7 (diff)
corrected typos in barycenter examples
-rw-r--r--examples/plot_barycenter_lp_vs_entropic.py7
-rw-r--r--examples/plot_free_support_barycenter.py2
2 files changed, 7 insertions, 2 deletions
diff --git a/examples/plot_barycenter_lp_vs_entropic.py b/examples/plot_barycenter_lp_vs_entropic.py
index b82765e..d7c72d0 100644
--- a/examples/plot_barycenter_lp_vs_entropic.py
+++ b/examples/plot_barycenter_lp_vs_entropic.py
@@ -102,7 +102,7 @@ pl.tight_layout()
problems.append([A, [bary_l2, bary_wass, bary_wass2]])
##############################################################################
-# Dirac Data
+# Stair Data
# ----------
#%% parameters
@@ -168,6 +168,11 @@ pl.legend()
pl.title('Barycenters')
pl.tight_layout()
+
+##############################################################################
+# Dirac Data
+# ----------
+
#%% parameters
a1 = np.zeros(n)
diff --git a/examples/plot_free_support_barycenter.py b/examples/plot_free_support_barycenter.py
index b6efc59..64b89e4 100644
--- a/examples/plot_free_support_barycenter.py
+++ b/examples/plot_free_support_barycenter.py
@@ -62,7 +62,7 @@ X = ot.lp.free_support_barycenter(measures_locations, measures_weights, X_init,
pl.figure(1)
for (x_i, b_i) in zip(measures_locations, measures_weights):
color = np.random.randint(low=1, high=10 * N)
- pl.scatter(x_i[:, 0], x_i[:, 1], s=b * 1000, label='input measure')
+ pl.scatter(x_i[:, 0], x_i[:, 1], s=b_i * 1000, label='input measure')
pl.scatter(X[:, 0], X[:, 1], s=b * 1000, c='black', marker='^', label='2-Wasserstein barycenter')
pl.title('Data measures and their barycenter')
pl.legend(loc=0)