Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python matplotlib arrow

import matplotlib.pyplot as plt

#define two arrays for plotting
A = [3, 5, 5, 6, 7, 8]
B = [12, 14, 17, 20, 22, 27]

#create scatterplot, specifying marker size to be 40
plt.scatter(A, B, s=40)

#add arrow to plot
plt.arrow(x=4, y=18, dx=2, dy=5, width=.08) 
  
#display plot 
plt.show()
Source by www.statology.org #
 
PREVIOUS NEXT
Tagged: #python #matplotlib #arrow
ADD COMMENT
Topic
Name
7+9 =