欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Matlab_GUI学习笔记——常用对象的属性之Axes

程序员文章站 2022-06-26 17:59:08
Matlab_GUI学习笔记(四)——常用对象的属性之Axes1. AxesAxes意为“轴”,是axis的复数。使用get函数查看Axes对象的属性,有一些属性与Figure的大致相同可以参考上一篇文章,这里重点介绍其他的比较常用的属性。>> get(axes) ALim: [0 1] ALimMode: 'auto' ActivePositionProperty: 'outerpositio...

Matlab_GUI学习笔记(四)——常用对象的属性之Axes


1. Axes

Axes意为“轴”,是axis的复数。使用get函数查看Axes对象的属性,有一些属性与Figure的大致相同可以参考上一篇文章,这里重点介绍其他的比较常用的属性。

>> get(axes)
                       ALim: [0 1]
                   ALimMode: 'auto'
     ActivePositionProperty: 'outerposition'
                 AlphaScale: 'linear'
                   Alphamap: [1×64 double]
          AmbientLightColor: [1 1 1]
               BeingDeleted: 'off'
                        Box: 'off'
                   BoxStyle: 'back'
                 BusyAction: 'queue'
              ButtonDownFcn: ''
                       CLim: [0 1]
                   CLimMode: 'auto'
             CameraPosition: [0.5000 0.5000 9.1603]
         CameraPositionMode: 'auto'
               CameraTarget: [0.5000 0.5000 0.5000]
           CameraTargetMode: 'auto'
             CameraUpVector: [0 1 0]
         CameraUpVectorMode: 'auto'
            CameraViewAngle: 6.6086
        CameraViewAngleMode: 'auto'
                   Children: [0×0 GraphicsPlaceholder]
                   Clipping: 'on'
              ClippingStyle: '3dbox'
                      Color: [1 1 1]
                 ColorOrder: [7×3 double]
            ColorOrderIndex: 1
                 ColorScale: 'linear'
                   Colormap: [64×3 double]
                  CreateFcn: ''
               CurrentPoint: [2×3 double]
            DataAspectRatio: [1 1 1]
        DataAspectRatioMode: 'auto'
                  DeleteFcn: ''
                  FontAngle: 'normal'
                   FontName: 'Helvetica'
                   FontSize: 10
               FontSizeMode: 'auto'
              FontSmoothing: 'on'
                  FontUnits: 'points'
                 FontWeight: 'normal'
                  GridAlpha: 0.1500
              GridAlphaMode: 'auto'
                  GridColor: [0.1500 0.1500 0.1500]
              GridColorMode: 'auto'
              GridLineStyle: '-'
           HandleVisibility: 'on'
                    HitTest: 'on'
               Interactions: [1×1 matlab.graphics.interaction.interface.DefaultAxesInteractionSet]
              Interruptible: 'on'
    LabelFontSizeMultiplier: 1.1000
                      Layer: 'bottom'
                     Legend: [0×0 GraphicsPlaceholder]
             LineStyleOrder: '-'
        LineStyleOrderIndex: 1
                  LineWidth: 0.5000
             MinorGridAlpha: 0.2500
         MinorGridAlphaMode: 'auto'
             MinorGridColor: [0.1000 0.1000 0.1000]
         MinorGridColorMode: 'auto'
         MinorGridLineStyle: ':'
                   NextPlot: 'replace'
              OuterPosition: [0 0 1 1]
                     Parent: [1×1 Figure]
              PickableParts: 'visible'
         PlotBoxAspectRatio: [1 0.7882 0.7882]
     PlotBoxAspectRatioMode: 'auto'
                   Position: [0.1300 0.1100 0.7750 0.8150]
                 Projection: 'orthographic'
                   Selected: 'off'
         SelectionHighlight: 'on'
                 SortMethod: 'childorder'
                        Tag: ''
                    TickDir: 'in'
                TickDirMode: 'auto'
       TickLabelInterpreter: 'tex'
                 TickLength: [0.0100 0.0250]
                 TightInset: [0.0438 0.0527 0.0171 0.0200]
                      Title: [1×1 Text]
    TitleFontSizeMultiplier: 1.1000
            TitleFontWeight: 'normal'
                    Toolbar: [1×1 AxesToolbar]
                       Type: 'axes'
              UIContextMenu: [0×0 GraphicsPlaceholder]
                      Units: 'normalized'
                   UserData: []
                       View: [0 90]
                    Visible: 'on'
                      XAxis: [1×1 NumericRuler]
              XAxisLocation: 'bottom'
                     XColor: [0.1500 0.1500 0.1500]
                 XColorMode: 'auto'
                       XDir: 'normal'
                      XGrid: 'off'
                     XLabel: [1×1 Text]
                       XLim: [0 1]
                   XLimMode: 'auto'
                 XMinorGrid: 'off'
                 XMinorTick: 'off'
                     XScale: 'linear'
                      XTick: [1×11 double]
                 XTickLabel: {11×1 cell}
             XTickLabelMode: 'auto'
         XTickLabelRotation: 0
                  XTickMode: 'auto'
                      YAxis: [1×1 NumericRuler]
              YAxisLocation: 'left'
                     YColor: [0.1500 0.1500 0.1500]
                 YColorMode: 'auto'
                       YDir: 'normal'
                      YGrid: 'off'
                     YLabel: [1×1 Text]
                       YLim: [0 1]
                   YLimMode: 'auto'
                 YMinorGrid: 'off'
                 YMinorTick: 'off'
                     YScale: 'linear'
                      YTick: [1×11 double]
                 YTickLabel: {11×1 cell}
             YTickLabelMode: 'auto'
         YTickLabelRotation: 0
                  YTickMode: 'auto'
                      ZAxis: [1×1 NumericRuler]
                     ZColor: [0.1500 0.1500 0.1500]
                 ZColorMode: 'auto'
                       ZDir: 'normal'
                      ZGrid: 'off'
                     ZLabel: [1×1 Text]
                       ZLim: [0 1]
                   ZLimMode: 'auto'
                 ZMinorGrid: 'off'
                 ZMinorTick: 'off'
                     ZScale: 'linear'
                      ZTick: [0 0.5000 1]
                 ZTickLabel: ''
             ZTickLabelMode: 'auto'
         ZTickLabelRotation: 0
                  ZTickMode: 'auto'
  • Box
    坐标是否被整个边框包围,默认为关闭,用onoff来指示开关。
    Matlab_GUI学习笔记——常用对象的属性之Axes

    ha = axes;
    set(ha, 'Box', 'on');			%将Box属性设置为开启
    
    Matlab_GUI学习笔记——常用对象的属性之Axes
  • GridLineStyle
    Grid为在坐标轴上添加网格,通过GridLineStyle设置格子的线型,默认为‘-’虚线。

  • Nextplot
    下次在坐标轴上绘制时是否覆盖前面的曲线。默认值NextPlot: 'replace'为替代,则新绘制的图会覆盖掉旧图。如果将参数设置为add则下次绘制时会直接在图上添加而不删除旧图。

  • XLim&YLim
    XY轴坐标的范围。

  • XLabel&YLabel
    XY轴坐标的标签。

  • XAxisLocation&YAxisLocation
    XY坐标轴的位置,

  • XGrid&YGrid&ZGrid
    XYZ方向的网格参考线开启与关闭。

本文地址:https://blog.csdn.net/Ucarrot/article/details/110427952