Matplotlib.pyplot.quiverkey() in Python Last Updated : 19 Apr, 2020 Comments Improve Suggest changes Like Article Like Report 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, etc. matplotlib.pyplot.quiverkey() Function The quiverkey() function in pyplot module of matplotlib library is used to add a key to a quiver plot. Syntax: matplotlib.pyplot.quiverkey(Q, X, Y, U, label, **kw) Parameters: This method accept the following parameters that are described below: Q: This parameter is the Quiver instance returned by a call to quiver. X, Y : These parameter are the x and y coordinates of the location of the key. U: This parameter is the length of the key. label: This parameter is a string with the length and units of the key. angles : This parameter is the angle of the arrows. color : This parameter is the overrides face and edge colors from Q. labelpos : This parameter is used to position the label above, below, to the right, to the left of the arrow. labelsep: This parameter is the distance in inches between the arrow and the label. labelcolor: This defaults to default Text color. fontproperties: This parameter is the dictionary with keyword arguments accepted by the FontProperties initializer: family, style, variant, size, weight. Below examples illustrate the matplotlib.pyplot.quiverkey() function in matplotlib.axes: Example 1: Python3 1== # Implementation of matplotlib function import matplotlib.pyplot as plt import numpy as np X = np.arange(-20, 20, 0.5) Y = np.arange(-20, 20, 0.5) U, V = np.meshgrid(X, Y) q = plt.quiver(X, Y, U, V) plt.quiverkey(q, X = 0.5, Y = 0.5, U = 500, label ='Quiver key') plt.title('matplotlib.pyplot.quiverkey() Example') plt.show() Output: Example 2: Python3 1== # Implementation of matplotlib function import matplotlib.pyplot as plt import numpy as np X, Y = np.meshgrid(np.arange(0, 2 * np.pi, .2), np.arange(0, 2 * np.pi, .2)) U = np.cos(X**2) V = np.sin(Y**2) C = U**2 + V**2 Q = plt.quiver(X, Y, U, V, C, units ='width') plt.quiverkey(Q, 0.4, 0.9, 1, r'val = $Cos(x ^ 2)^2 + Sin(x ^ 2)^2$', labelpos ='E', coordinates ='figure') plt.title('matplotlib.pyplot.quiverkey() Example\n', fontsize = 14, fontweight ='bold') plt.show() Output: Comment More infoAdvertise with us Next Article Matplotlib.pyplot.quiverkey() in Python S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python-matplotlib Practice Tags : python Similar Reads Matplotlib.pyplot.quiver() in Python 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.qui 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.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.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 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.xkcd() in Python One of the main process in Data Science is Data Visualization. Data Visualization refers to present a dataset in the form of graphs and pictures. We can identify upcoming trend by observing these Graphs. Python provides us with an amazing Data Visualization library in it which is Matplotlib which wa 2 min read Matplotlib.pyplot.twinx() 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 Like