I am trying to plot an array created by one hot encoding for nucleotide sequences. the sequences were positive and negatives and I wish to change the color of scatterplot with two different colors. Not sure what goes wrong here
dim1 = pca_result[:,0]
dim2 = pca_result[:,1]
plt.figure(figsize=(10,10))
plt.scatter(dim1, dim2, cmap= 'YlGnBu' ,c=search_reg['NR+/-'], s=1)
plt.title("PCA for Negative data")
plt.xlabel('PCA 1')
plt.ylabel('PCA 2')
plt.show()
dim1
and dim 2
are arrays while the search_reg['NR+/-']
contains values of 0s and 1s.
The graph plotted is in black and white but due to white background, its not clearly visible.
How may I change the color of the graphs?