1. 程式人生 > >matlab影象GUI學習筆記

matlab影象GUI學習筆記

get  獲得某物件屬性

set 設定某物件屬性

findobj 尋找符合屬性要求的物件

allchild 尋找某一物件的子物件

常用的圖形物件:

Figure

Axes

Line

Text

Uicontrol

所有屬性 :

Alphamap = [ (1 by 64) double array]
CloseRequestFcn = closereq        %關閉窗體
Color = [0.8 0.8 0.8]            %窗體顏色
Colormap = [ (64 by 3) double array]
CurrentAxes = []                    %座標子物件
CurrentCharacter =            %當前按下的字元
CurrentObject = []                %CurrentAxes 中的物件
CurrentPoint = [0 0]            %滑鼠位置
DockControls = on
FileName = 
IntegerHandle = on
InvertHardcopy = on
KeyPressFcn = 
KeyReleaseFcn = 
MenuBar = figure     %預設的選單屬性    none 取消任何選單
Name =  %更改窗體名字   
NextPlot = add           %疊加影象
NumberTitle = on %

開關  窗體名字   
PaperUnits = centimeters
PaperOrientation = portrait
PaperPosition = [0.634517 6.34517 20.3046 15.2284]
PaperPositionMode = manual
PaperSize = [20.984 29.6774]
PaperType = A4
Pointer = arrow
PointerShapeCData = [ (16 by 16) double array]
PointerShapeHotSpot = [1 1]
Position = [560 528 560 420]     %Units為pixels時為整數    為歸一化時,用01間小數
Renderer = None
RendererMode = auto
Resize = on %是否可以改變窗體大小
ResizeFcn = 
SelectionType = normal
ToolBar = auto
Units = pixels     %窗體單位:1、畫素   2、歸一化單位  Normalized
WindowButtonDownFcn =    %
滑鼠按下時 所執行的回撥函式   如closereq
WindowButtonMotionFcn =        %鍵盤按下時 所執行的回撥函式   如closereq       
WindowButtonUpFcn = 
WindowKeyPressFcn = 
WindowKeyReleaseFcn = 
WindowScrollWheelFcn =      %滾動滑輪
WindowStyle = normal
WVisual = 00 (RGB 32  GDI, Bitmap, Window)
WVisualMode = auto


BeingDeleted = off
ButtonDownFcn = 
Children = []
Clipping = on
CreateFcn = 
DeleteFcn = 
BusyAction = queue
HandleVisibility = on
HitTest = on
Interruptible = on
Parent = [0]
Selected = off
SelectionHighlight = on
Tag = 
Type = figure
UIContextMenu = []
UserData = []
Visible = on

axes     座標軸物件屬性

GUI_button_shuxing
ActivePositionProperty = outerposition
ALim = [0 1]
ALimMode = auto
AmbientLightColor = [1 1 1]
Box = off % 四周都有 座標
CameraPosition = [0.5 0.5 9.16025]
CameraPositionMode = auto
CameraTarget = [0.5 0.5 0.5]
CameraTargetMode = auto
CameraUpVector = [0 1 0]
CameraUpVectorMode = auto
CameraViewAngle = [6.60861]
CameraViewAngleMode = auto
CLim = [0 1]
CLimMode = auto
Color = [1 1 1]
CurrentPoint = [ (2 by 3) double array]
ColorOrder = [ (7 by 3) double array]
DataAspectRatio = [1 1 1]
DataAspectRatioMode = auto
DrawMode = normal
FontAngle = normal
FontName = Helvetica
FontSize = [10]
FontUnits = points
FontWeight = normal
GridLineStyle = :%網路線型
Layer = bottom
LineStyleOrder = -
LineWidth = [0.5]
MinorGridLineStyle = : %子線網路線型 
NextPlot = replace %   幾個圖形的關係   覆蓋   ADD疊加
OuterPosition = [0 0 1 1]
PlotBoxAspectRatio = [1 1 1]
PlotBoxAspectRatioMode = auto
Projection = orthographic
Position = [0.13 0.11 0.775 0.815]
TickLength = [0.01 0.025]
TickDir = in
TickDirMode = auto
TightInset = [0.0392857 0.0404762 0.00892857 0.0190476]
Title = [176.204]
Units = normalized%單位預設歸一化
View = [0 90]
XColor = [0 0 0]
XDir = normal
XGrid = off
XLabel = [177.2]
XAxisLocation = bottom%x座標在上面 還是下面
XLim = [0 1] %座標軸X的範圍
XLimMode = auto
XMinorGrid = off
XMinorTick = off
XScale = linear
XTick = [ (1 by 11) double array]
XTickLabel = [ (11 by 3) char array]
XTickLabelMode = auto
XTickMode = auto
YColor = [0 0 0]
YDir = normal
YGrid = off
YLabel = [178.2]
YAxisLocation = left %y座標在上面 還是下面
YLim = [0 1]     %座標軸Y的範圍   
YLimMode = auto
YMinorGrid = off
YMinorTick = off
YScale = linear
YTick = [ (1 by 11) double array]
YTickLabel = [ (11 by 3) char array]
YTickLabelMode = auto
YTickMode = auto
ZColor = [0 0 0]
ZDir = normal
ZGrid = off
ZLabel = [179.205]
ZLim = [0 1]
ZLimMode = auto
ZMinorGrid = off
ZMinorTick = off
ZScale = linear
ZTick = [0 0.5 1]
ZTickLabel = 
ZTickLabelMode = auto
ZTickMode = auto


BeingDeleted = off
ButtonDownFcn = 
Children = []
Clipping = on
CreateFcn = 
DeleteFcn = 
BusyAction = queue
HandleVisibility = on
HitTest = on
Interruptible = on
Parent = [1]
Selected = off
SelectionHighlight = on
Tag = 
Type = axes
UIContextMenu = []
UserData = []
Visible = on

line  物件 屬性

 GUI_button_shuxing
           DisplayName: ''
            Annotation: [1x1 hg.Annotation]
                 Color: [0 0 1]
             LineStyle: '-'
             LineWidth: 0.5000
                Marker: 'none'
            MarkerSize: 6 %標記尺寸大小
       MarkerEdgeColor: 'auto'%線型的邊緣顏色
       MarkerFaceColor: 'none' %線型的填充顏色
                 XData: [1x101 double]%XYZ   是3個核心的資料物件 
                 YData: [1x101 double]
                 ZData: [1x0 double]
          BeingDeleted: 'off'
         ButtonDownFcn: []
              Children: [0x1 double]
              Clipping: 'on'
             CreateFcn: []
             DeleteFcn: []
            BusyAction: 'queue'
      HandleVisibility: 'on'
               HitTest: 'on'
         Interruptible: 'on'
              Selected: 'off'
    SelectionHighlight: 'on'
                   Tag: ''
                  Type: 'line'
         UIContextMenu: []
              UserData: []
               Visible: 'on'
                Parent: 175.2024
             XDataMode: 'auto'
           XDataSource: ''
           YDataSource: ''
           ZDataSource: ''

繪圖

ezplot 可以繪製隱函式所得到的曲線

GUI06
Annotation = [ (1 by 1) hg.Annotation array]
BackgroundColor = none
Color = [0 0 0]
DisplayName = 
EdgeColor = none
Editing = off
Extent = [0.995402 0.96793 0.0781609 0.0524781]
FontAngle = normal
FontName = Helvetica
FontSize = [10]
FontUnits = points
FontWeight = normal
HorizontalAlignment = left
LineStyle = -
LineWidth = [0.5]
Margin = [2]
Position = [1 1 0]
Rotation = [0]
String = 示例 %具體字型
Units = data
Interpreter = tex%顯示公式的時候   預設的是 tex翻譯方式
VerticalAlignment = middle


BeingDeleted = off
ButtonDownFcn = 
Children = []
Clipping = off
CreateFcn = 
DeleteFcn = 
BusyAction = queue
HandleVisibility = on
HitTest = on
Interruptible = on
Parent = [1.2085]
Selected = off
SelectionHighlight = on
Tag = 
Type = text
UIContextMenu = []
UserData = []
Visible = on