Commit
·
8522e75
1
Parent(s):
13b5dca
Updating T-SNE Plot
Browse files
Data_Plotting/Plot_TSNE.py
CHANGED
@@ -27,7 +27,8 @@ def plot_dimensionality_reduction(x, y, label_set, title):
|
|
27 |
plt.title(title)
|
28 |
if label_set[0].dtype == float:
|
29 |
plt.scatter(x, y, c=label_set)
|
30 |
-
plt.colorbar()
|
|
|
31 |
print("using scatter")
|
32 |
else:
|
33 |
for label in set(label_set):
|
@@ -35,6 +36,8 @@ def plot_dimensionality_reduction(x, y, label_set, title):
|
|
35 |
plt.plot(x[cond], y[cond], marker='o', linestyle='none', label=label)
|
36 |
|
37 |
plt.legend(numpoints=1)
|
|
|
|
|
38 |
########################################################################################################################
|
39 |
"""
|
40 |
# Use for personal plotting
|
|
|
27 |
plt.title(title)
|
28 |
if label_set[0].dtype == float:
|
29 |
plt.scatter(x, y, c=label_set)
|
30 |
+
cbar = plt.colorbar()
|
31 |
+
cbar.set_label('Average Density', fontsize=20)
|
32 |
print("using scatter")
|
33 |
else:
|
34 |
for label in set(label_set):
|
|
|
36 |
plt.plot(x[cond], y[cond], marker='o', linestyle='none', label=label)
|
37 |
|
38 |
plt.legend(numpoints=1)
|
39 |
+
plt.xlabel("Dimension 1")
|
40 |
+
plt.ylabel("Dimension 2")
|
41 |
########################################################################################################################
|
42 |
"""
|
43 |
# Use for personal plotting
|