Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

label point matplotlib

from matplotlib import pyplot as plt

xC=0 #x cordonate
yC=0 #y cordonate
label = "[your label goes here]" #label text

plt.text(xC, yC, label) 
plt.show()
Comment

matplotlib point labels

import matplotlib.pyplot as plt
import numpy as np

plt.clf()

# using some dummy data for this example
xs = np.arange(0,10,1)
ys = np.random.normal(loc=2.0, scale=0.8, size=10)

plt.plot(xs,ys)

# text is left-aligned
plt.text(2,4,'This text starts at point (2,4)')

# text is right-aligned
plt.text(8,3,'This text ends at point (8,3)',horizontalalignment='right')

plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: tensor vs numpy array 
Python :: keep only one duplicate in pandas 
Python :: pdf to csv python 
Python :: how to load mnist dataset in python 
Python :: pandas map using two columns 
Python :: python check if key exists 
Python :: python rdp server 
Python :: calculate percentile pandas dataframe 
Python :: pyton filter 
Python :: python how to count all elements in a list 
Python :: checkbutton tkinter example 
Python :: wait driver selenium 
Python :: requests.Session() proxies 
Python :: how to run .exe from python 
Python :: Find the title of a page in python 
Python :: python lambda 
Python :: initialise a 2d array python 
Python :: isaplha in python 
Python :: how to convert boolean type list to integer 
Python :: convert list to dataframe 
Python :: turn a list into a string python 
Python :: sorting tuples 
Python :: import file from parent directory python 
Python :: create an empty list of lists in python 
Python :: python append filename to path 
Python :: dummy variables pandas 
Python :: cumulative percentaile pandas 
Python :: nested loop in list comprehension 
Python :: python pipe 
Python :: how to count null values in pandas and return as percentage 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =