matlab里查看图像属性,MATLAB绘图属性操作
前言 MATLAB的繪圖功能十分強(qiáng)大,可以繪制各種各樣的圖形,數(shù)據(jù)可視化十分強(qiáng)大,但有時(shí),采用默認(rèn)的繪圖屬性,圖形的形式符合我們的要求,學(xué)會(huì)使用圖形句柄,并利用句柄修改屬性是十分重要的。
1.句柄之間的關(guān)系
在MATLAB中figure有句柄,axis有句柄,line,bar,plot等都有句柄,我們首先要搞清楚這些句柄的繼承關(guān)系,才能找到正確的句柄并修改其屬性的參數(shù)。
figure句柄
........
annotation
........
2.常用的操作句柄的函數(shù)
2.1 獲取句柄
創(chuàng)建對(duì)象時(shí),使用輸出參數(shù)。例如:hf=figure; hb=bar(X);
也可以使用h=gca獲取當(dāng)前軸句柄,gcf獲取當(dāng)前figure句柄,gco獲取當(dāng)前活動(dòng)句柄。
獲取父句柄子句柄,h1=get(h,'child');
2.2 獲取句柄所管理的屬性 get(h)
2.3 獲取句柄指定屬性的參數(shù)值 get(h,'propertyName');
2.4 修改句柄指定屬性的值 set(h,'propertyName',propertyValue)
3.常用句柄的屬性
1??? Axes常用的屬性:
Box??????????????????? 'on'(default) , 'off'
GridLineStyle?????????? '-'??? ':'???? '-.'?? 'none'
LineStyleOrder???????? LineSpec
LineWidth????????? .5(default)
TickDir?????????????? 'in'(default),? 'out'
TickDirMode???????????? 'auto'(default),???? 'manual'
Visible??????????????? 'on'(default), 'off'
XGrid,YGrid,ZGrid 'on', 'off'(default)
Children???????????? Handles of images, lights, lines,...
Parent???????????????? Handler of the figure window
Position????????????? 設(shè)置軸在figure中的大小與位置,[leftbottom width height](歸一化的單位)
FontAngle????????? 'normal'(de), 'italic', 'oblique'
FontName????????? 字體類(lèi)型
FontSize???????????? 10(de)
FontWeight??????? 字體粗細(xì) 'normal',??? 'bold',??? 'light'
Title??????????????????? 標(biāo)題 text句柄?? 注意:可以用text(x,y,'...')函數(shù)創(chuàng)建text對(duì)象
XLabel,YLabel,ZLabel??? 軸標(biāo)簽 text句柄
XTick,YTick,ZTick?? 軸的劃分
XTickMode,..??????????? 'auto','manual'
XTickLabel,...?????????? 軸刻度的標(biāo)簽
XTickLabelMode???????????? 'auto',???? 'manual'
XAxisLocation???????? x軸的位置 'bottom',????????????? 'top'
YAxisLocation????????? y軸的位置 'left',????? 'right'
XLim,YLim,ZLim?????????? 軸的范圍
XLimMode,..??????????? 'auto',???? 'manual'
XScale,..???????????? 指定是線性刻度'linear',或?qū)?shù)刻度'log'
Color ??????????????? 背景顏色ColorSpec 'none'(de)
ColorOrder???????? 指定線的顏色順序 m行3列的RGB矩陣
XColor,..??????????? 軸的顏色ColorSpec
2??? Line的常用的屬性
LineStyle??????????? -????? --???? -.???? :
LineWidth????????? .5(de)
Marker
MarkerEdgeColor??????????? 由ColorSpec指定
MarkerFaceColor???????????? ...
MarkerSize???????? 6(de)
Color????????????????? 線的顏色 ColorSpec指定
3??? text對(duì)象的屬性
FontSize
FontAngle????????? ‘normal’, ‘italic’
Color
Interpreter????????? tex, latex
總結(jié)
以上是生活随笔為你收集整理的matlab里查看图像属性,MATLAB绘图属性操作的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 安谋科技发布自研“周易”X2 NPU:性
- 下一篇: 传热学环肋肋效率matlab程序,传热学