Skip to content

Commit

Permalink
Fix PCA plot axes
Browse files Browse the repository at this point in the history
  • Loading branch information
kbtriangulum committed Oct 18, 2022
1 parent 1b7f487 commit 5b9080d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions sdnist/metrics/edit_distance_graph/communities.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def louvain(self):
for n, c in partition.items():
comms[c].append(n)
self.comms = comms

self.add_communities_to_graph()

def girvan_newman(self):
Expand Down
4 changes: 2 additions & 2 deletions sdnist/metrics/pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ def plot_pca(title: str, data: pd.DataFrame, out_file, color='b'):
if pc_i == pc_j:
ax_t = ax[i, j]
ax_t.text(0.5, 0.5, pc_i,
ha='center', va='center', color='black', fontsize=30)
ha='center', va='center', color='black', fontsize=30)
else:
df_ij = data[[pc_i, pc_j]]
ax_t = ax[i, j]
df_ij.plot(ax=ax_t, kind='scatter',
x=pc_i, y=pc_j, c='none',
x=pc_j, y=pc_i, c='none',
facecolor='none', edgecolors=color)
ax_t.set_xlabel('')
ax_t.set_ylabel('')
Expand Down

0 comments on commit 5b9080d

Please sign in to comment.