Skip to content

Commit f4c03a1

Browse files
author
Alexander Ororbia
committed
minor edit to dim-reduce
1 parent 6bc5cd8 commit f4c03a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: ngclearn/utils/viz/dim_reduce.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ def plot_latents(code_vectors, labels, plot_fname="2Dcode_plot.jpg", alpha=1.):
7979
classes.
8080
8181
plot_fname: /path/to/plot_fname.<suffix> for saving the plot to disk
82+
83+
alpha:
8284
"""
8385
curr_backend = plt.rcParams["backend"]
8486
matplotlib.use('Agg') ## temporarily go in Agg plt backend for tsne plotting
@@ -91,7 +93,9 @@ def plot_latents(code_vectors, labels, plot_fname="2Dcode_plot.jpg", alpha=1.):
9193
lab = np.argmax(lab, 1)
9294
plt.figure(figsize=(8, 6))
9395
plt.scatter(code_vectors[:, 0], code_vectors[:, 1], c=lab, cmap=cmap, alpha=alpha)
94-
plt.colorbar()
96+
colorbar = plt.colorbar()
97+
#colorbar.set_alpha(1)
98+
#plt.draw_all()
9599
plt.grid()
96100
plt.savefig("{0}".format(plot_fname), dpi=300)
97101
plt.clf()

0 commit comments

Comments
 (0)