Answers for "scatter plot label colors python"

-1

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
0

colors in scatter plot python

import matplotlib.pyplot as plt
import numpy as np
ID = np.array([1,2,3,4,5,6,7,8,9,10])
marks = np.array([95,98,83,75,67,58,67,78,53,32])
plt.scatter(ID, marks, color= 'black')
plt.show()
Posted by: Guest on February-17-2022

Code answers related to "TypeScript"

Browse Popular Code Answers by Language