标签:
要查看Matlab所有绘图函数,请从Matlab主界面菜单查看“绘图目录”,或从Matlab帮助文档查看“Types of MATLAB Plots”( 在线版本 )。本文的图和英文解释摘自Matlab帮助文档。
类别 |
Function |
图 |
维度 |
描述 |
曲线 |
plot |
![]() |
2 |
绘制曲线,相邻点之间被插值 |
fplot |
输入函数或函数句柄、自变量取值区间,绘制曲线 |
|||
plotyy |
![]() |
2 |
双纵坐标图,两个纵坐标的数量级不同 |
|
plot3 |
![]() |
3 |
绘制3D曲线 |
|
loglog |
![]() |
2 |
X,Y坐标都按对数缩放 |
|
semilogx |
![]() |
2 |
仅X坐标按对数缩放 |
|
semilogy |
![]() |
2 |
仅 Y左边按对数缩放 |
|
errorbar |
![]() |
2 |
误差条形图,见 wikipedia“Error bar” |
|
条形 直方 面域 |
bar |
|
2 |
条形图(垂直),分为 grouped和 stacked风格 |
bar3 |
![]() |
3 |
3D条形图(垂直) |
|
barh |
|
2 |
水平条形图, 分为 grouped和stacked风格 |
|
bar3h |
![]() |
3 |
3D 水平 条形图 |
|
hist |
![]() |
2 |
频数直方图 |
|
histc |
输入数据和区间,返回数据落在每个区间的频数 |
|||
pareto |
![]() |
2 |
帕累托图,见 wikipedia“Pareto Chart” |
|
area |
![]() |
2 |
面域图,曲线和X轴之间被填充 |
|
pie |
![]() |
2 |
饼图,用于表示比例 |
|
pie3 |
![]() |
3 |
3D饼图 |
|
极坐标 |
polar |
![]() |
2 |
以极坐标绘制曲线 |
rose |
![]() |
2 |
频数扇形图 |
|
离散数据 |
stem |
![]() |
2 |
杆图,对每个数据,从X轴伸出一条垂直线,顶端画圆圈 |
stem3 | ![]() |
3 | 3D杆图 | |
stairs | ![]() |
2 | 阶梯图,相邻点间不进行插值 | |
scatter | ![]() |
2 | 散点图,绘制一系列散点 | |
scatter3 |
![]() |
3 |
3D散点图 |
|
spy |
![]() |
2 |
稀疏模式(sparsity pattern)图,对矩阵非0的地方绘制散点 |
|
plotmatrix |
![]() |
2 |
将矩阵绘制为散点图或散点图和直方图 |
|
轮廓 |
contour |
![]() |
2 |
轮廓图,二维函数的等值线 |
contour3 |
![]() |
3 |
3D轮廓图,三维函数(空间函数)的等值线 |
|
contourf |
![]() |
2 |
填充的轮廓图 |
|
contourc |
轮廓计算 |
|||
曲面 网格 |
surf |
![]() |
3 |
曲面,和mesh的区别是,surf在小矩形上做颜色插值 |
surfl |
![]() |
3 |
在surf基础上,加入光照 |
|
surfc |
![]() |
3 |
在surf基础上,在底部绘制轮廓图 |
|
surfnorm |
![]() |
3 |
在surf基础上,每个面绘制法线 |
|
surface |
低层次曲面绘制函数 |
|||
mesh |
![]() |
3 |
网格图,在行和列上绘制一系列曲线,构成网格 |
|
meshc |
![]() |
3 |
在mesh基础上,在底部绘制轮廓图 |
|
meshz |
![]() |
3 |
在mesh基础上,在网格四周绘制“帘子” |
|
waterfall |
![]() |
3 |
瀑布图,类似于meshz函数,但在矩阵的列之间不生成线 |
|
ribbon |
![]() |
3 |
带图,绘制一定宽度的带,相当于将二维曲线沿着垂直平面方向拉开一定宽度形成三维图形 |
|
pcolor |
![]() |
2 |
伪彩图,根据矩阵的“相邻四个点”的值对应颜色插值得到小矩形颜色 |
|
peaks |
Example function of two variables |
|||
cylinder |
Generate cylinder |
|||
ellipsoid |
Generate ellipsoid |
|||
sphere |
Generate sphere |
|||
surf2patch |
Convert surface data to patch data |
|||
标量场 体数据 |
slice |
![]() |
3 |
对体数据进行切片观察 |
contour-slice |
![]() |
3 |
3D轮廓切片,3D轮廓图沿平面的切片 |
|
flow |
Simple function of three variables |
|||
isosurface |
Extract isosurface data from volume data |
|||
isocaps |
Compute isosurface end-cap geometry |
|||
isocolors |
Calculate isosurface and patch colors |
|||
isonormals |
Compute normals of isosurface vertices |
|||
reduce-patch |
Reduce number of patch faces |
|||
reduce-volume |
Reduce number of elements in volume data set |
|||
shrinkfaces |
Reduce size of patch faces |
|||
smooth3 |
Smooth 3-D data |
|||
subvolume |
Extract subset of volume data set |
|||
volume bounds |
Coordinate and color limits for volume data |
|||
向量场 体向量数据 |
feather |
![]() |
2 |
羽毛图,以X轴上的点为起点绘制一系列向量 |
compass |
![]() |
2 |
射线图,以原点为起点绘制一系列向量 |
|
quiver |
|
2 |
箭头图,绘制一系列向量,起点由矩阵指定 |
|
quiver3 |
![]() |
3 |
3D箭头图 |
|
streamslice |
![]() |
3 |
绘制流场(三维向量函数)的切片流线图 |
|
streamline |
![]() |
3 |
绘制 流场 的流线(类似于磁感线),起点由数据指定 |
|
coneplot |
![]() |
3 |
绘制三维圆锥,圆锥的底面中点(起点)以及方向和大小由流场指定 |
|
stream-particles |
![]() |
3 |
绘制流场marker粒子 |
|
stream-ribbon |
![]() |
3 |
绘制流场ribbon图 |
|
streamtube |
![]() |
3 |
绘制流场流管 |
|
curl |
Compute curl and angular velocity of vector field |
|||
divergence |
Compute divergence of vector field |
|||
interp-stream-speed |
Interpolate stream-line vertices from flow speed |
|||
stream2 |
Compute 2-D streamline data |
|||
stream3 |
Compute 3-D streamline data |
|||
多边形 |
fill |
![]() |
2 |
绘制填充的多边形 |
fill3 |
![]() |
3 |
3D填充多边形 |
|
patch |
![]() |
2,3 |
绘制一个或多个填充多边形 |
|
Easy-to-use |
ezplot |
![]() |
2 |
Easy-to-use版绘图函数,这类函数传入要绘制的函数或函数句柄,以及自变量的定义域,调用具体函数绘图。 例如 ezplot的一种调用方式是: ezplot(fun,[xmin,xmax]) |
ezplot3 |
![]() |
3 |
||
ezpolar |
![]() |
2 |
||
ezcontour |
![]() |
2 |
||
ezcontourf |
![]() |
2 |
||
ezsurf |
![]() |
3 |
||
ezsurfc |
![]() |
3 |
||
ezmesh |
![]() |
3 |
||
ezmeshc |
![]() |
3 |
||
动画 |
comet |
![]() |
2 |
彗星图,绘制一个类似彗星运动的动画,头部是圆圈,运动轨迹遍历数据 |
comet3 |
![]() |
3 |
3D彗星图 |
|
image |
![]() |
2 |
将矩阵绘制成图像 |
|
movie |
Play recorded movie frames |
|||
noanimate |
Change EraseMode of all objects to normal |
|||
drawnow |
Update figure window and execute pending callbacks |
|||
refreshdata |
Refresh data in graph when data source is specified |
|||
frame2im |
Return image data associated with movie frame |
|||
getframe |
Capture movie frame |
|||
im2frame |
Convert image to movie frame |
参考文献:
Matlab R2014a帮助文档,“MATLAB/Graphics”( 在线版本 )。
标签:
原文地址:http://www.cnblogs.com/sddne/p/4701767.html