trying to look at the pca_plot 3
This commit is contained in:
parent
dc23065cc8
commit
a36226eab9
BIN
p2/quest/biber_pca_affil.png
Normal file
BIN
p2/quest/biber_pca_affil.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 434 KiB |
@ -1,5 +1,5 @@
|
|||||||
starting the job at: Tue Sep 2 15:53:08 CDT 2025
|
starting the job at: Tue Sep 2 16:02:22 CDT 2025
|
||||||
setting up the environment
|
setting up the environment
|
||||||
running the neurobiber labeling script
|
running the neurobiber labeling script
|
||||||
job finished, cleaning up
|
job finished, cleaning up
|
||||||
job pau at: Tue Sep 2 15:53:21 CDT 2025
|
job pau at: Tue Sep 2 16:02:32 CDT 2025
|
||||||
|
@ -5,6 +5,7 @@ import pandas as pd
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
import seaborn as sns
|
||||||
|
|
||||||
|
|
||||||
def format_df_data(df):
|
def format_df_data(df):
|
||||||
@ -33,3 +34,20 @@ if __name__ == "__main__":
|
|||||||
plt.colorbar()
|
plt.colorbar()
|
||||||
|
|
||||||
plt.savefig("090225_biber_pca_plot.png", dpi=300)
|
plt.savefig("090225_biber_pca_plot.png", dpi=300)
|
||||||
|
|
||||||
|
plot_df = pd.DataFrame({
|
||||||
|
"PC1": biber_vecs_pca[:, 0],
|
||||||
|
"PC2": biber_vecs_pca[:, 1],
|
||||||
|
"AuthorWMFAffil": biber_vec_df["AuthorWMFAffil"].astype(str)
|
||||||
|
})
|
||||||
|
plt.figure(figsize=(8,6))
|
||||||
|
sns.scatterplot(
|
||||||
|
data=plot_df, x="PC1", y="PC2", hue="AuthorWMFAffil",
|
||||||
|
palette="tab10", s=40, alpha=0.7, edgecolor=None
|
||||||
|
)
|
||||||
|
plt.xlabel('component 1')
|
||||||
|
plt.ylabel('component 2')
|
||||||
|
plt.legend(title='AuthorWMFAffil', bbox_to_anchor=(1.05, 1), loc=2)
|
||||||
|
plt.tight_layout()
|
||||||
|
plt.savefig("biber_pca_affil.png", dpi=300)
|
||||||
|
plt.show()
|
||||||
|
Loading…
Reference in New Issue
Block a user