Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

add text to plot python scatter

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.subplots()
ax.scatter(z, y)

for i, txt in enumerate(n):
    ax.annotate(txt, (z[i], y[i]))
Comment

PREVIOUS NEXT
Code Example
Python :: how to define a constant in python 
Python :: pd df to series 
Python :: python download youtube video 
Python :: create close python program in puthon 
Python :: lag function in pandas 
Python :: tf dropout 
Python :: word generator in python 
Python :: python turtle clear screen 
Python :: playsound error python 
Python :: swapping of two numbers in python 
Python :: scanner class in python 
Python :: get python path 
Python :: sum of any numbers in python 
Python :: remove index from dataframe pandas 
Python :: python run all tests 
Python :: set camera width and height opencv python 
Python :: replace value pandas df 
Python :: choromap = go.Figure(data=[data], layout = layout) 
Python :: python reverse a string 
Python :: get first row sqlalchemy 
Python :: python append a file and read 
Python :: python program to solve quadratic equation 
Python :: passing user instance django form submission 
Python :: python scatter plot legend 
Python :: To View the entire Row and Column in a Dataframe 
Python :: csv library python convert dict to csv 
Python :: python remove string from string 
Python :: perimeter of circle 
Python :: plt.legend( 
Python :: value count in python 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =