Machine Learning ‘quiver’

I have a question about plt.quiver()
Even though I have read about the function, I did not understand what ‘angles’ do? For instance, if inside the function angles is ‘uv’, what does it plot? I would appreciate if anyone can explain me with examples.

Best Regards

Hi @shhuseynli2018

I suggest you look at this article here.

# Import libraries 
import numpy as np 
import matplotlib.pyplot as plt 
# Creating arrow 
x_pos = [0, 0] 
y_pos = [0, 0] 
x_direct = [1, 0] 
y_direct = [1, -1] 
# Creating plot 
fig, ax = plt.subplots(figsize = (12, 7)) 
ax.quiver(x_pos, y_pos, x_direct, y_direct, scale = 5, angles='uv') 
ax.axis([-1.5, 1.5, -1.5, 1.5]) 
# show plot

This code is taken from the above article just change the value of the angles parameter to ‘xy’ and see the output.
I hope this will help you.

Happy Learning.