0

I am plotting pcaplots and biplots and I would like to remove the labels on the arrow and place them outside the figure. I would appreciate any help with this.

This is what I have tried so far: cluster.biplot(cscore=pca_scores, loadings=loadings, labels=new_df1.columns.values, var1=round(pca.explained_variance_ratio_[0]*100, 2), var2=round(pca.explained_variance_ratio_[1]*100, 2)) ax.legend(loc='center left')

and this is what i get: enter image description here

but I need something like this where the labels are neatly arranged:

enter image description here

maks
  • 11
  • 4
  • Which plotting library are you using? Can you give some context? – alec_djinn May 31 '23 at 09:16
  • Hi @alec_djinn, I'm using bioinfokit.visuz which is shipped with anaconda – maks May 31 '23 at 09:22
  • Have you tried passing the parameter `plotlabels=False`? It is described in the docs. – alec_djinn May 31 '23 at 09:32
  • Also, in order to get help, you will need to provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). If your question includes a pandas dataframe, please provide a [reproducible pandas example](https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) – alec_djinn May 31 '23 at 09:32
  • plotlabels didn't work – maks May 31 '23 at 09:40

0 Answers0