I'd like to rotate text / labels for each (x,y)
scatterplot points.
Here's my dataframe:
import pandas as pd
import seaborn sns
df1 = pd.DataFrame({"one": [1,2,3,5,6,7,8],
"two": [3,6,4,3,8,2,5],
"label":['a','b','c','d','e','f','g']})
ax = sns.scatterplot(x='one', y='two', data = df1)
for line in range(0,df1.shape[0]):
ax.text(df1.one[line]+0.04,
df1.two[line],
df1.label[line], horizontalalignment='left',
size='medium', color='black', weight='semibold')
I'd like to rotate labels to 45, so that they're visible / clear.