Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

matplotlib draw a line between two points

import matplotlib.pyplot as plt
# Just plot a normal line plot consisting of the two desired points
p1 = [0,3]
p2 = [1,-2]
x, y = [p1[0], p2[0]], [p1[1], p2[1]]

plt.plot(x,y)
plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: numpy distance between two points 
Python :: add day in date python 
Python :: gdscript 2d movement 
Python :: python how to obfuscate code 
Python :: combining 2 dataframes pandas 
Python :: python pickle save and load multiple variables 
Python :: how to print a line letter by letter in python 
Python :: choosing the correct lower and upper bounds in cv2 
Python :: edit line if str end with pandas 
Python :: how to pronounce aesthetic 
Python :: tsv to csv python 
Python :: django q filter 
Python :: compute mfcc python 
Python :: python class documentation 
Python :: removing odd index character of a given string in python 
Python :: none address in python 
Python :: element not found selenium stackoverflow 
Python :: python encrypt password 
Python :: python expression factorisation 
Python :: python string to xml 
Python :: How to ungrid something tkinter 
Python :: native bold text 
Python :: delete a record by id in flask sqlalchemy 
Python :: save matplotlib figure 
Python :: create list in range 
Python :: python strftime iso 8601 
Python :: install python 3 on mac 
Python :: jinja len is undefined 
Python :: django genericforeignkey null 
Python :: discord.py get a bot online 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =