Matlab繪圖函數一覽

 

  要查看Matlab全部繪圖函數,請從Matlab主界面菜單查看「繪圖目錄」,或從Matlab幫助文檔查看「Types of MATLAB Plots」(在線版本)。本文的圖和英文解釋摘自Matlab幫助文檔。html

類別curl

Function函數

動畫

維度ui

描述url

曲線spa

plotorm

2htm

繪製曲線,相鄰點之間被插值blog

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

切片等高線圖,體數據在切片平面中的等值線

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」(在線版本)。

相關文章
相關標籤/搜索