Matplotlib是Python中的一個庫,它是數字的-NumPy庫的數學擴展。 Pyplot是Matplotlib模塊的基於狀態的接口,該模塊提供了MATLAB-like接口。可在Pyplot中使用的各種圖線圖,輪廓圖,直方圖,散點圖,3D圖等。
matplotlib.pyplot.get_plot_commands()方法
matplotlib庫的pyplot模塊中的get_plot_commands()方法用於獲取所有繪圖命令的排序列表。
用法:matplotlib.pyplot.get_plot_commands()
參數:此方法不接受任何參數。
返回:此方法返回所有繪圖命令的排序列表。
以下示例說明了matplotlib.pyplot中的matplotlib.pyplot.get_plot_commands()函數:
例:
# Implementation of matplotlib function
import numpy as np
import matplotlib.pyplot as plt
w = plt.get_plot_commands()
print("List of all of the plotting commands:")
for i in w:
print(i)
輸出:
List of all of the plotting commands: acorr angle_spectrum annotate arrow autoscale axes axhline axhspan axis axvline axvspan bar barbs barh box boxplot broken_barh cla clabel clf clim close cohere colorbar contour contourf csd delaxes draw errorbar eventplot figimage figlegend fignum_exists figtext figure fill fill_between fill_betweenx findobj gca gcf gci get_figlabels get_fignums grid hexbin hist hist2d hlines imread imsave imshow install_repl_displayhook ioff ion isinteractive legend locator_params loglog magnitude_spectrum margins matshow minorticks_off minorticks_on pause pcolor pcolormesh phase_spectrum pie plot plot_date plotfile polar psd quiver quiverkey rc rc_context rcdefaults rgrids savefig sca scatter sci semilogx semilogy set_cmap setp show specgram spy stackplot stem step streamplot subplot subplot2grid subplot_tool subplots subplots_adjust suptitle switch_backend table text thetagrids tick_params ticklabel_format tight_layout title tricontour tricontourf tripcolor triplot twinx twiny uninstall_repl_displayhook violinplot vlines xcorr xkcd xlabel xlim xscale xticks ylabel ylim yscale yticks
注:本文由純淨天空篩選整理自SHUBHAMSINGH10大神的英文原創作品 Matplotlib.pyplot.get_plot_commands() in Python。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。