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.get_plot_commands() method
The
get_plot_commands() method in pyplot module of matplotlib library is used to get the sorted list of all of the plotting commands.
Syntax:matplotlib.pyplot.get_plot_commands()Parameters:This method does not accept any parameters.Returns:This method returns sorted list of all of the plotting commands.
Below examples illustrate the matplotlib.pyplot.get_plot_commands() function in matplotlib.pyplot:
Example:Python3 1==# Implementation of matplotlib functionimportnumpyasnpimportmatplotlib.pyplotaspltw=plt.get_plot_commands()print("List of all of the plotting commands : ")foriinw:print(i)
Output:List of all of the plotting commands : acorrangle_spectrumannotatearrowautoscaleaxesaxhlineaxhspanaxisaxvlineaxvspanbarbarbsbarhboxboxplotbroken_barhclaclabelclfclimclosecoherecolorbarcontourcontourfcsddelaxesdrawerrorbareventplotfigimagefiglegendfignum_existsfigtextfigurefillfill_betweenfill_betweenxfindobjgcagcfgciget_figlabelsget_fignumsgridhexbinhisthist2dhlinesimreadimsaveimshowinstall_repl_displayhookioffionisinteractivelegendlocator_paramsloglogmagnitude_spectrummarginsmatshowminorticks_offminorticks_onpausepcolorpcolormeshphase_spectrumpieplotplot_dateplotfilepolarpsdquiverquiverkeyrcrc_contextrcdefaultsrgridssavefigscascatterscisemilogxsemilogyset_cmapsetpshowspecgramspystackplotstemstepstreamplotsubplotsubplot2gridsubplot_toolsubplotssubplots_adjustsuptitleswitch_backendtabletextthetagridstick_paramsticklabel_formattight_layouttitletricontourtricontourftripcolortriplottwinxtwinyuninstall_repl_displayhookviolinplotvlinesxcorrxkcdxlabelxlimxscalexticksylabelylimyscaleyticks