Matplotlib.pyplot.quiver() in Python Last Updated : 10 Apr, 2024 Comments Improve Suggest changes Like Article Like Report Matplotlib is a library of Python bindings which provides the user with a MATLAB-like plotting framework. Matplotlib can be used in Python scripts, the Python and IPython shell, web application servers, and various graphical user interface toolkits like Tkinter, awxPython, etc. Matplotlib.pyplot.quiver()matplotlib.pyplot.quiver method is used to plot a 2D field of arrows. Syntax: matplotlib.pyplot.quiver(x_coordinate, y_coordinate, x_direction, y_direction) Parameters:x_coordinate : x-coordinate of the arrow location y_coordinate : y-coordinate of the arrow location x_direction : x-component of the direction of the arrow y_direction : y-component of the direction of the arrow Optional Parameters:scale: used to set the scale of the graph scale_units: used to set the units of the plane with respect to x and y angle: used to determine the angle of the arrow vectors plotted Return Value : Returns a 2D graph with arrows plotted Example #1 Python 1== #Python program to explain # matplotlib.pyplot.quiver method import matplotlib.pyplot as plt import numpy as np #defining necessary arrays x = np.linspace(0,2,8) y = np.linspace(2,0,8) x_dir = y_dir = np.zeros((8,8)) y_dir[5,5] = 0.2 #plotting the 2D graph plt.quiver(x, y, x_dir, y_dir, scale=1) Output: Example #2 Plotting multiple arrows on a graph using quiver method Python3 1== # Python program to explain # matplotlib.pyplot.quiver method # importing necessary libraries import matplotlib.pyplot as plt # defining necessary arrays x_coordinate = [0, 1.5] y_coordinate = [0.5, 1.5] x_direction = [1, -0.5] y_direction = [1, -1] # plotting the graph plt.quiver(x_coordinate, y_coordinate, x_direction, y_direction, scale_units ='xy', scale = 1.) Output: Comment More infoAdvertise with us Next Article Matplotlib.pyplot.quiver() in Python R rajatsahay719 Follow Improve Article Tags : Python Python-matplotlib Practice Tags : python Similar Reads Matplotlib.pyplot.quiverkey() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 2 min read Matplotlib.pyplot.sci() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 2 min read Matplotlib.pyplot.xlim() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 2 min read Matplotlib.pyplot.stem() in Python Matplotlib is a visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. matplotlib.pyplot.stem() matplotlib.pyplot.stem() creates stem plots. A Stem plot plots vertical 3 min read Matplotlib.pyplot.ylim() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. matplotlib.pyplot.ylim() Function The ylim() function in pyplot module of matplotlib library is used to g 2 min read Matplotlib.pyplot.twiny() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. Sample Code Python3 1== # sample code import matplotlib.pyplot as plt plt.plot([1, 2, 3, 4], [16, 4, 1, 8 2 min read Matplotlib.pyplot.sca() in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 1 min read Matplotlib.pyplot.specgram() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. matplotlib.pyplot.specgram() Function The specgram() function in pyplot module of matplotlib library is u 3 min read Quiver Plot in Matplotlib Quiver plot is basically a type of 2D plot which shows vector lines as arrows. This type of plots are useful in Electrical engineers to visualize electrical potential and show stress gradients in Mechanical engineering. Creating a Quiver Plot Let's start creating a simple quiver plot containing one 5 min read Matplotlib.pyplot.yticks() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. Matplotlib.pyplot.yticks() Function The annotate() function in pyplot module of matplotlib library is use 2 min read Like