Answers for "add labels to scatter plot python seaborn"

0

how to plot scatter plot using seaborn

>>> import seaborn as sns; sns.set()
>>> import matplotlib.pyplot as plt
>>> tips = sns.load_dataset("tips")
>>> ax = sns.scatterplot(x="total_bill", y="tip", data=tips)
Posted by: Guest on May-03-2020
0

how to label points in scatter plot in python

y = [2.56422, 3.77284, 3.52623, 3.51468, 3.02199]
z = [0.15, 0.3, 0.45, 0.6, 0.75]
n = [58, 651, 393, 203, 123]

fig, ax = plt.scatter(z, y)

for i, txt in enumerate(n):
    ax.annotate(txt, (z[i], y[i]))
Posted by: Guest on March-10-2021

Code answers related to "add labels to scatter plot python seaborn"

Python Answers by Framework

Browse Popular Code Answers by Language