http://matplotlib.org/api/pyplot_summary.html

作图命令

方法 描述 类型
angle_spectrum Plot the angle spectrum. plot
arrow Add an arrow to the axes. plot
bar Make a bar plot. plot
barbs Plot a 2-D field of barbs. plot
barh Make a horizontal bar plot. plot
boxplot Make a box and whisker plot. plot
broken_barh Plot horizontal bars. Plot
cohere Plot the coherence between?x?and?y. plot
contour Plot contours. plot
contourf Plot contours. plot
csd Plot the cross-spectral density. plot
errorbar Plot an errorbar graph. plot
eventplot Plot identical parallel lines at specific positions. plot
fill Plot filled polygons. 做面积图 plot
fill_between Make filled polygons between two curves.
fill_betweenx Make filled polygons between two horizontal curves.
hexbin Make a hexagonal binning plot. plot
hist Plot a histogram. plot
hist2d Make a 2D histogram plot. plot
loglog Make a plot with log scaling on both the?x?and?y?axis. plot
magnitude_spectrum Plot the magnitude spectrum. Plot
pcolormesh Plot a quadrilateral mesh. Plot
phase_spectrum Plot the phase spectrum. Plot
pie Plot a pie chart. Plot
plot Plot lines and/or markers to the?Axes. Plot
plot_date A plot with data that contains dates. Plot
plotfile Plot the data in in a file. Plot
polar Make a polar plot. plot
thetagrids Get or set the theta locations of the gridlines in a polar plot.
psd Plot the power spectral density. Plot
quiver Plot a 2-D field of arrows. Plot
scatter Make a scatter plot of?x?vs?y?Marker size is scaled by?s?and marker color is mapped to?cParameters ———- x, y : array_like, shape (n, ) Input data s : scalar or array_like, shape (n, ), optional size in points^2. plot
semilogx Make a plot with log scaling on the?x?axis. plot
semilogy Make a plot with log scaling on the?y?axis. plot
specgram Plot a spectrogram. Plot
spy Plot the sparsity pattern on a 2-D array. Plot
stem Create a stem plot. plot
step Make a step plot. plot
streamplot Draws streamlines of a vector flow. plot
violinplot Make a violin plot. Plot
xcorr Plot the cross correlation between?x?and?y. Plot
acorr Plot the autocorrelation of?x.

坐标轴命令

方法 描述 类型
axis Convenience method to get or set axis properties. axis
yticks Get or set the?y-limits of the current tick locations and labels. yticks
yscale Set the scaling of the?y-axis. yscale
ylim Get or set the?y-limits of the current axes. ylim
ylabel Set the?y?axis label of the current axis. ylabel
xticks Get or set the?x-limits of the current tick locations and labels. xticks
xscale Set the scaling of the?x-axis. xscale
xlim Get or set the?x?limits of the current axes. xlim
xlabel Set the?x?axis label of the current axis. xlabel
minorticks_off Remove minor ticks from the current plot. ticks
minorticks_on Display minor ticks on the current plot. ticks
autoscale Autoscale the axis view to the data (toggle). scale

图文说明命令

方法 描述 类型
suptitle Add a centered title to the figure. title
title Set a title of the current axes. title
figtext Add text to figure. text
text Add text to the axes. text
grid 控制背景网格线 axes
table Add a table to the current axes. table
figlegend Place a legend in the figure. legend
legend Places a legend on the axes. legend
annotate Annotate the point?xy?with text?s. Annotate
colorbar Add a colorbar to a plot. colorbar
set_cmap Set the default colormap.

辅助线

方法 描述 类型
vlines Plot vertical lines. vlines
hlines Plot horizontal lines at each?y?from?xmin?to?xmax. hlines
axvspan Add a vertical span (rectangle) across the axes. axvspan
axvline Add a vertical line across the axes. axvline
axhspan Add a horizontal span (rectangle) across the axis. axhspan
axhline Add a horizontal line across the axis. axhline
twinx Make a second axes that shares the?x-axis. axes
twiny Make a second axes that shares the?y-axis. axes

图片

方法 描述 类型
imread Read an image from a file into an array. image
imsave Save an array as in image file. image
imshow Display an image on the axes. image
clim Set the color limits of the current image. image
sci Set the current image. image

figure

方法 描述 类型
figure Creates a new figure. figure
figimage Adds a non-resampled image to the figure. figimage
clf Clear the current figure. figure
close Close a figure window. figure
draw Redraw the current figure. figure
gcf Get a reference to the current figure. figure
savefig Save the current figure.
show Display a figure.
get_figlabels Return a list of existing figure labels. figure
get_fignums Return a list of existing figure numbers. figure

axes

方法 描述 类型
axes Add an axes to the figure. axes
box Turn the axes box on or off. axes
cla Clear the current axes. axes
delaxes Remove an axes from the current figure. axes
gca Get the current?Axes?instance on the current figure matching the given keyword args, or create one. axes
sca Set the current Axes instance to?ax. axes
subplot Return a subplot axes positioned by the given grid definition. axes
subplot2grid Create a subplot in a grid. axes
subplot_tool Launch a subplot tool window for a figure. axes
subplots Create a figure and a set of subplots This utility wrapper makes it convenient to create common layouts of subplots, including the enclosing figure object, in a single call. axes
subplots_adjust Tune the subplot layout. axes

其他

方法 描述 类型
stackplot Draws a stacked area plot. Draws
clabel Label a contour plot.
fignum_exists
findobj Find artist objects.
gci Get the current colorable artist.
hold
install_repl_displayhook Install a repl display hook so that any stale figure are automatically redrawn when control is returned to the repl.
ioff Turn interactive mode off.
ion Turn interactive mode on.
ishold
isinteractive Return status of interactive mode.
locator_params Control behavior of tick locators.
margins Set or retrieve autoscaling margins.
matshow Display an array as a matrix in a new figure window.
over
pause Pause for?interval?seconds.
pcolor Create a pseudocolor plot of a 2-D array.
quiverkey Add a key to a quiver plot.
rc Set the current rc params.
rc_context Return a context manager for managing rc settings.
rcdefaults Restore the rc params from Matplotlib’s internal defaults.
rgrids Get or set the radial gridlines on a polar plot.
setp Set a property on an artist object.
switch_backend Switch the default backend.
tick_params Change the appearance of ticks and tick labels.
ticklabel_format Change the?ScalarFormatter?used by default for linear axes.
tight_layout Automatically adjust subplot parameters to give specified padding.
tricontour Draw contours on an unstructured triangular grid.
tricontourf Draw contours on an unstructured triangular grid.
tripcolor Create a pseudocolor plot of an unstructured triangular grid.
triplot Draw a unstructured triangular grid as lines and/or markers.
uninstall_repl_displayhook Uninstalls the matplotlib display hook.
xkcd Turns on?xkcd?sketch-style drawing mode.

Matplotlib 命令总结相关推荐

  1. matplotlib命令与格式:图像(figure)与子区域(axes)布局与规划

    1.figure语法及操作 (1)figure语法说明 figure(num=None, figsize=None, dpi=None, facecolor=None, edgecolor=None, ...

  2. matplotlib命令与格式:图例legend语法及设置

    1.图例legend基础语法及用法 legend语法参数如下: matplotlib.pyplot.legend(*args, **kwargs) (1)设置图例位置 使用loc参数 plt.lege ...

  3. [Tips]matplotlib 命令行画图保存

    服务器上没有图形界面,需要用matplotlib画图并直接保存成图片,然后下载到客户端查看. 1. 首先安装matplotlib: python -m pip install -U matplotli ...

  4. 原 matplotlib命令与格式:系统字体与显示中文

    版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/helunqu2017/article/ ...

  5. matplotlib命令与格式:标题(title),标注(annotate),文字说明(text)-------(含绘图实例演示)

    Python 全栈工程师核心面试 300 问深入解析(2020 版)----全文预览 Python 全栈工程师核心面试 300 问深入解析(2020 版)----欢迎订阅 1.title设置图像标题 ...

  6. matplotlib命令与格式:标题(title),标注(annotate),文字说明(text)

    1.title设置图像标题 (1)title常用参数 fontsize设置字体大小,默认12,可选参数 ['xx-small', 'x-small', 'small', 'medium', 'larg ...

  7. matplotlib命令与格式:标题(title)

    1.title设置图像标题 (1)title常用参数 fontsize设置字体大小,默认12,可选参数 ['xx-small', 'x-small', 'small', 'medium', 'larg ...

  8. %matplotlib inline的含义

    %matplotlib inline的含义 %matplotlib inline 用在Jupyter notebook中(代替plt.show()): PyCharm中不支持,在PyCharm中去掉这 ...

  9. python入门指南bl-Python Matplotlib 绘图使用指南 (附代码)

    雷锋网(公众号:雷锋网)按:本文为雷锋字幕组编译的技术博客,原标题 Matplotlib Plotting Guide, 作者为 Prince Grover. 翻译 | 李振 于志鹏 整理 | 凡江 ...

最新文章

  1. java面试 socket_【面试题】Java 的通信编程,编程题(或问答),用JAVA SOCKET 编程,读服务器几个字符,再写入本地显示?...
  2. Java加密解密入门
  3. 计算机网络_第7版_谢希仁_目录
  4. [批处理]自动设置本机系统代理服务器
  5. 牛人写SCI常用经典词和常用句型
  6. Pandas实用技能,数据筛选query函数详细介绍
  7. Linux命令行下抓取HTTP流量的工具--httpry
  8. ssms的导入功能_SSMS 17中的新增功能; PowerShell和DAX
  9. [转]SDN与OpenFlow技术简介
  10. Xna环境在PC平台下的功能扩展
  11. mysql 360怎么安装_mysql 5.7 安装配置方法图文教程
  12. iis8 php mysql zend,强烈推荐windows 2012 iis8 fastcgi php5.2.17 zend mysql
  13. python代码-让你的Python代码实现类型提示功能
  14. Python_继承_构造函数
  15. rabbitnq 源码安装_RabbitMQ的安装步骤
  16. ANSYS mesh网格划分
  17. 浅谈测试小白到测试大牛的成长历程(分四个境界)
  18. 主板怎么开启csm_主板的Launch CSM的开启和关闭是什么作用?会有哪些影响?
  19. 2022届美团和腾讯校招薪资出来了,被倒挂了。。。
  20. word撰写格式系列2

热门文章

  1. 使用线性回归拟合平面最佳直线及预测之Python+sklearn实现
  2. mysql 创建时间 只能设置一个_在MySQL中创建数据表时,可以设定主键、外键。那么对于一个数据表,能设置的主键和外键个数最多分别是...
  3. 134.加油站(javascript)
  4. c 子类对象 访问父类对象受保护成员_面向对象的三大特征
  5. QT每日一练day23:鼠标进入与离开事件
  6. java编写一个移动物体_java编写一个可以上下移动的小球:运行后,可以通过上下左右键进行移动...
  7. vue 获取id元素,vue.js怎么获取dom元素?
  8. mysql如何创建日志_mysql中的日志
  9. 二叉树寻找祖先C语言,微软算法面试题:给定两个二叉树节点,寻找其最近共同祖先...
  10. mysql任务计划怎么定制_mysql计划任务