>> >> >> >> help HELP topics: m-files/opnml - (No table of contents file) CfinDA/mfiles - (No table of contents file) NWASC/mfiles - (No table of contents file) m-files/WHALES - (No table of contents file) BIOMAPPER/TSplotter - (No table of contents file) m-files/BIOMAPPER - HTI Acoustic Processing MARMAP/mmdb - MARMAP/mminterface - Interface for MARMAP database m-files/MARMAP - MARMAP Database m-files/theory - Theoretical ecology m-files/statistics - Statistics m-files/MPQUOD - Parallelization routines for QUODDY m-files/meshpart - Mesh Partitioning Toolbox. m-files/misc - Miscellaneous routines (Utilities, etc.) m-files/graphics - Graphics m-files/forward - Forward problem routines m-files/Hydra - (No table of contents file) m-files/diffusiontheory - Reaction-Diffusion theory m-files/krig - Kriging--AJP GBgrid/tracers - Simulation routines for VCCs m-files/GBgrid - Georges Bank grid experiment routines m-files/BIBTEX - (No table of contents file) m-files/GOMbathy - Bathymetry of the Gulf of Maine m-files/FEM - Finite Element Routines--AJP m-files/VCOMP - (No table of contents file) Alvin/m-files - Andrew J. Pershing's Matlab Routines pershing/matlab - (No table of contents file) matlab/general - General purpose commands. matlab/ops - Operators and special characters. matlab/lang - Programming language constructs. matlab/elmat - Elementary matrices and matrix manipulation. matlab/elfun - Elementary math functions. matlab/specfun - Specialized math functions. matlab/matfun - Matrix functions - numerical linear algebra. matlab/datafun - Data analysis and Fourier transforms. matlab/audio - Audio support. matlab/polyfun - Interpolation and polynomials. matlab/funfun - Function functions and ODE solvers. matlab/sparfun - Sparse matrices. matlab/graph2d - Two dimensional graphs. matlab/graph3d - Three dimensional graphs. matlab/specgraph - Specialized graphs. matlab/graphics - Handle Graphics. matlab/uitools - Graphical user interface tools. matlab/strfun - Character strings. matlab/iofun - File input/output. matlab/timefun - Time and dates. matlab/datatypes - Data types and structures. matlab/verctrl - Version control. matlab/demos - Examples and demonstrations. toolbox/local - Preferences. simulink/simulink - Simulink simulink/blocks - Simulink block library. simulink/components - Simulink components. simulink/fixedandfloat - (No table of contents file) fixedandfloat/fxpdemos - Fixed-Point Blockset Demos fixedandfloat/obsolete - Obsolete Fixed-Point Blockset simulink/simdemos - Simulink 4 demonstrations and samples. simdemos/aerospace - Simulink: Aerospace model demonstrations and samples. simdemos/automotive - Simulink: Automotive model demonstrations and samples. simdemos/simfeatures - Simulink: Feature demonstrations and samples. simdemos/simgeneral - Simulink: General model demonstrations and samples. simdemos/simnew - Simulink: New features model demonstrations and samples. simulink/dee - Differential Equation Editor simulink/dastudio - (No table of contents file) stateflow/stateflow - Stateflow stateflow/sfdemos - Stateflow demonstrations and samples. stateflow/coder - Stateflow Coder rtw/rtw - (No table of contents file) rtw/rtwdemos - (No table of contents file) aeroblks/aeroblks - Aerospace Blockset aeroblks/aerodemos - Aerospace Blockset demonstrations and examples. toolbox/compiler - MATLAB Compiler control/control - Control System Toolbox. control/ctrlguis - Control System Toolbox -- GUI support functions. control/ctrlobsolete - Control System Toolbox -- obsolete commands. control/ctrlutil - (No table of contents file) control/ctrldemos - Control System Toolbox -- Demos. curvefit/curvefit - Curve Fitting Toolbox curvefit/cftoolgui - (No table of contents file) database/database - Database Toolbox. database/dbdemos - Database Toolbox Demonstration Functions. database/vqb - Visual Query Builder functions. filterdesign/filterdesign - Filter Design Toolbox filterdesign/quantization - (No table of contents file) filterdesign/filtdesdemos - Filter Design Toolbox Demonstrations. finance/finance - Financial Toolbox. finance/calendar - Financial Toolbox calendar functions. finance/findemos - Financial Toolbox demonstration functions. finance/finsupport - (No table of contents file) finderiv/finderiv - Financial Derivatives Toolbox. ftseries/ftseries - Financial Time Series Toolbox ftseries/ftsdemos - (No table of contents file) ftseries/ftsdata - (No table of contents file) ftseries/ftstutorials - (No table of contents file) fuzzy/fuzzy - Fuzzy Logic Toolbox. fuzzy/fuzdemos - Fuzzy Logic Toolbox Demos. images/images - Image Processing Toolbox. images/imdemos - Image Processing Toolbox --- demos and sample images lmi/lmictrl - LMI Control Toolbox: Control Applications lmi/lmilab - LMI Control Toolbox map/map - Mapping Toolbox map/mapdisp - Mapping Toolbox Map Definition and Display. map/mapproj - Mapping Toolbox Projections. toolbox/ncd - Nonlinear Control Design Blockset nnet/nnet - Neural Network Toolbox. nnet/nnutils - (No table of contents file) nnet/nncontrol - Neural Network Toolbox Control System Functions. nnet/nndemos - Neural Network Demonstrations. nnet/nnobsolete - (No table of contents file) toolbox/optim - Optimization Toolbox toolbox/pde - Partial Differential Equation Toolbox. simulink/perftools - Simulink Performance Tools simulink/mdldiff - Simulink Graphical Merge simulink/simcoverage - Simulink Model Coverage Tool rtw/accel - Simulink Accelerator toolbox/rptgen - MATLAB Report Generator toolbox/rptgenext - Simulink Report Generator toolbox/sb2sl - SB2SL (converts SystemBuild to Simulink) signal/signal - Signal Processing Toolbox signal/sigtools - Filter Design & Analysis Tool (GUI) signal/sptoolgui - Signal Processing Toolbox GUI signal/sigdemos - Signal Processing Toolbox Demonstrations. toolbox/splines - Spline Toolbox. toolbox/stats - Statistics Toolbox wavelet/wavelet - Wavelet Toolbox wavelet/wavedemo - Wavelet Toolbox Demonstrations. opnml/FDCONT - (No table of contents file) opnml/FEM - OPNML/MATLAB5 FEM-related routines opnml/IO_Functions - OPNML/MATLAB5 IO-related routines opnml/MEX - (No table of contents file) opnml/basics - OPNML/MATLAB5 routines not specifically related to FEM grid structures. opnml/mat4 - OPNML/MATLAB4 routines - provided for backward compatibility For more help on directory/topic, type "help topic". For command syntax information, type "help syntax". >> >> help spy SPY Visualize sparsity pattern. SPY(S) plots the sparsity pattern of the matrix S. SPY(S,'LineSpec') uses the color and marker from the line specification string 'LineSpec' (See PLOT for possibilities). SPY(S,markersize) uses the specified marker size instead of a size which depends upon the figure size and the matrix order. SPY(S,'LineSpec',markersize) sets both. >> A=eye(10) A = Columns 1 through 8 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 9 through 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 >> A(5,:)=1 A = Columns 1 through 8 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 9 through 10 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 >> spy(A) >> h=get(gca,'children') h = 101.0050 >> get(h) Color = [0 0 1] EraseMode = normal LineStyle = none LineWidth = [0.5] Marker = . MarkerSize = [14] MarkerEdgeColor = auto MarkerFaceColor = none XData = [ (1 by 19) double array] YData = [ (1 by 19) double array] ZData = [] BeingDeleted = off ButtonDownFcn = Children = [] Clipping = on CreateFcn = DeleteFcn = BusyAction = queue HandleVisibility = on HitTest = on Interruptible = on Parent = [100.004] Selected = off SelectionHighlight = on Tag = Type = line UIContextMenu = [] UserData = [] Visible = on >> get(gca) ALim = [0 1] ALimMode = auto AmbientLightColor = [1 1 1] Box = on CameraPosition = [5.5 5.5 155.885] CameraPositionMode = auto CameraTarget = [5.5 5.5 0] CameraTargetMode = auto CameraUpVector = [0 -1 0] CameraUpVectorMode = auto CameraViewAngle = [8.07278] CameraViewAngleMode = auto CLim = [0 1] CLimMode = auto Color = [1 1 1] CurrentPoint = [ (2 by 3) double array] ColorOrder = [ (7 by 3) double array] DataAspectRatio = [0.5 0.5 1] DataAspectRatioMode = auto DrawMode = normal FontAngle = normal FontName = Helvetica FontSize = [12] FontUnits = points FontWeight = normal GridLineStyle = none Layer = bottom LineStyleOrder = - LineWidth = [0.5] MinorGridLineStyle = : NextPlot = replace PlotBoxAspectRatio = [11 11 1] PlotBoxAspectRatioMode = manual Projection = orthographic Position = [0.13 0.11 0.775 0.815] TickLength = [0.01 0.025] TickDir = in TickDirMode = auto Title = [105.002] Units = normalized View = [0 90] XColor = [0 0 0] XDir = normal XGrid = off XLabel = [102.007] XAxisLocation = bottom XLim = [0 11] XLimMode = manual XMinorGrid = off XMinorTick = off XScale = linear XTick = [0 2 4 6 8 10] XTickLabel = 0 2 4 6 8 10 XTickLabelMode = auto XTickMode = auto YColor = [0 0 0] YDir = reverse YGrid = off YLabel = [103.003] YAxisLocation = left YLim = [0 11] YLimMode = manual YMinorGrid = off YMinorTick = off YScale = linear YTick = [0 2 4 6 8 10] YTickLabel = 0 2 4 6 8 10 YTickLabelMode = auto YTickMode = auto ZColor = [0 0 0] ZDir = normal ZGrid = off ZLabel = [104.004] ZLim = [-1 1] ZLimMode = auto ZMinorGrid = off ZMinorTick = off ZScale = linear ZTick = [-1 0 1] ZTickLabel = ZTickLabelMode = auto ZTickMode = auto BeingDeleted = off ButtonDownFcn = Children = [101.005] 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 >> set(gca,'ydir','normal') >> set(gca) ALim ALimMode: [ {auto} | manual ] AmbientLightColor Box: [ on | {off} ] CameraPosition CameraPositionMode: [ {auto} | manual ] CameraTarget CameraTargetMode: [ {auto} | manual ] CameraUpVector CameraUpVectorMode: [ {auto} | manual ] CameraViewAngle CameraViewAngleMode: [ {auto} | manual ] CLim CLimMode: [ {auto} | manual ] Color ColorOrder DataAspectRatio DataAspectRatioMode: [ {auto} | manual ] DrawMode: [ {normal} | fast ] FontAngle: [ {normal} | italic | oblique ] FontName FontSize FontUnits: [ inches | centimeters | normalized | {points} | pixels ] FontWeight: [ light | {normal} | demi | bold ] GridLineStyle: [ - | -- | {:} | -. | none ] Layer: [ top | {bottom} ] LineStyleOrder LineWidth MinorGridLineStyle: [ - | -- | {:} | -. | none ] NextPlot: [ add | {replace} | replacechildren ] PlotBoxAspectRatio PlotBoxAspectRatioMode: [ {auto} | manual ] Projection: [ {orthographic} | perspective ] Position TickLength TickDir: [ {in} | out ] TickDirMode: [ {auto} | manual ] Title Units: [ inches | centimeters | {normalized} | points | pixels | characters ] View XColor XDir: [ {normal} | reverse ] XGrid: [ on | {off} ] XLabel XAxisLocation: [ top | {bottom} ] XLim XLimMode: [ {auto} | manual ] XMinorGrid: [ on | {off} ] XMinorTick: [ on | {off} ] XScale: [ {linear} | log ] XTick XTickLabel XTickLabelMode: [ {auto} | manual ] XTickMode: [ {auto} | manual ] YColor YDir: [ {normal} | reverse ] YGrid: [ on | {off} ] YLabel YAxisLocation: [ {left} | right ] YLim YLimMode: [ {auto} | manual ] YMinorGrid: [ on | {off} ] YMinorTick: [ on | {off} ] YScale: [ {linear} | log ] YTick YTickLabel YTickLabelMode: [ {auto} | manual ] YTickMode: [ {auto} | manual ] ZColor ZDir: [ {normal} | reverse ] ZGrid: [ on | {off} ] ZLabel ZLim ZLimMode: [ {auto} | manual ] ZMinorGrid: [ on | {off} ] ZMinorTick: [ on | {off} ] ZScale: [ {linear} | log ] ZTick ZTickLabel ZTickLabelMode: [ {auto} | manual ] ZTickMode: [ {auto} | manual ] ButtonDownFcn: string -or- function handle -or- cell array Children Clipping: [ {on} | off ] CreateFcn: string -or- function handle -or- cell array DeleteFcn: string -or- function handle -or- cell array BusyAction: [ {queue} | cancel ] HandleVisibility: [ {on} | callback | off ] HitTest: [ {on} | off ] Interruptible: [ {on} | off ] Parent Selected: [ on | off ] SelectionHighlight: [ {on} | off ] Tag UIContextMenu UserData Visible: [ {on} | off ] >> set(h,'linestyle','-') >> >> >> x=linspace(0,100,500); >> y=2*10.^(x-1); >> clf >> plot(x,y) >> h=semilogy(x,y) h = 102.0074 >> set(gca) ALim ALimMode: [ {auto} | manual ] AmbientLightColor Box: [ on | {off} ] CameraPosition CameraPositionMode: [ {auto} | manual ] CameraTarget CameraTargetMode: [ {auto} | manual ] CameraUpVector CameraUpVectorMode: [ {auto} | manual ] CameraViewAngle CameraViewAngleMode: [ {auto} | manual ] CLim CLimMode: [ {auto} | manual ] Color ColorOrder DataAspectRatio DataAspectRatioMode: [ {auto} | manual ] DrawMode: [ {normal} | fast ] FontAngle: [ {normal} | italic | oblique ] FontName FontSize FontUnits: [ inches | centimeters | normalized | {points} | pixels ] FontWeight: [ light | {normal} | demi | bold ] GridLineStyle: [ - | -- | {:} | -. | none ] Layer: [ top | {bottom} ] LineStyleOrder LineWidth MinorGridLineStyle: [ - | -- | {:} | -. | none ] NextPlot: [ add | {replace} | replacechildren ] PlotBoxAspectRatio PlotBoxAspectRatioMode: [ {auto} | manual ] Projection: [ {orthographic} | perspective ] Position TickLength TickDir: [ {in} | out ] TickDirMode: [ {auto} | manual ] Title Units: [ inches | centimeters | {normalized} | points | pixels | characters ] View XColor XDir: [ {normal} | reverse ] XGrid: [ on | {off} ] XLabel XAxisLocation: [ top | {bottom} ] XLim XLimMode: [ {auto} | manual ] XMinorGrid: [ on | {off} ] XMinorTick: [ on | {off} ] XScale: [ {linear} | log ] XTick XTickLabel XTickLabelMode: [ {auto} | manual ] XTickMode: [ {auto} | manual ] YColor YDir: [ {normal} | reverse ] YGrid: [ on | {off} ] YLabel YAxisLocation: [ {left} | right ] YLim YLimMode: [ {auto} | manual ] YMinorGrid: [ on | {off} ] YMinorTick: [ on | {off} ] YScale: [ {linear} | log ] YTick YTickLabel YTickLabelMode: [ {auto} | manual ] YTickMode: [ {auto} | manual ] ZColor ZDir: [ {normal} | reverse ] ZGrid: [ on | {off} ] ZLabel ZLim ZLimMode: [ {auto} | manual ] ZMinorGrid: [ on | {off} ] ZMinorTick: [ on | {off} ] ZScale: [ {linear} | log ] ZTick ZTickLabel ZTickLabelMode: [ {auto} | manual ] ZTickMode: [ {auto} | manual ] ButtonDownFcn: string -or- function handle -or- cell array Children Clipping: [ {on} | off ] CreateFcn: string -or- function handle -or- cell array DeleteFcn: string -or- function handle -or- cell array BusyAction: [ {queue} | cancel ] HandleVisibility: [ {on} | callback | off ] HitTest: [ {on} | off ] Interruptible: [ {on} | off ] Parent Selected: [ on | off ] SelectionHighlight: [ {on} | off ] Tag UIContextMenu UserData Visible: [ {on} | off ] >> get(gca) ALim = [0 1] ALimMode = auto AmbientLightColor = [1 1 1] Box = on CameraPosition = [50 5e+99 17.3205] CameraPositionMode = auto CameraTarget = [50 5e+99 0] 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 = [50 5e+99 1] DataAspectRatioMode = auto DrawMode = normal FontAngle = normal FontName = Helvetica FontSize = [12] FontUnits = points FontWeight = normal GridLineStyle = : Layer = bottom LineStyleOrder = - LineWidth = [0.5] MinorGridLineStyle = : NextPlot = replace 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 Title = [100.005] Units = normalized View = [0 90] XColor = [0 0 0] XDir = normal XGrid = off XLabel = [103.003] XAxisLocation = bottom XLim = [0 100] XLimMode = auto XMinorGrid = off XMinorTick = off XScale = linear XTick = [0 20 40 60 80 100] XTickLabel = 0 20 40 60 80 100 XTickLabelMode = auto XTickMode = auto YColor = [0 0 0] YDir = normal YGrid = off YLabel = [104.005] YAxisLocation = left YLim = [1e-20 1e+100] YLimMode = auto YMinorGrid = off YMinorTick = on YScale = log YTick = [ (1 by 7) double array] YTickLabel = -20 0 20 40 60 80 100 YTickLabelMode = auto YTickMode = auto ZColor = [0 0 0] ZDir = normal ZGrid = off ZLabel = [105.003] ZLim = [-1 1] ZLimMode = auto ZMinorGrid = off ZMinorTick = off ZScale = linear ZTick = [-1 0 1] ZTickLabel = ZTickLabelMode = auto ZTickMode = auto BeingDeleted = off ButtonDownFcn = Children = [102.007] 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 >> [ax1,h1,h2]=plotyy(x,y,x,log10(y)) ax1 = 101.0051 100.0051 h1 = 106.0010 h2 = 102.0076 >> set(ax1(1),'yscale','log') >> set(ax1,'xlim',[20 60]) >> get(ax1(1)) ALim = [0 1] ALimMode = auto AmbientLightColor = [1 1 1] Box = on CameraPosition = [40 1e+99 17.3205] CameraPositionMode = auto CameraTarget = [40 1e+99 0] 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 = [20 1e+99 1] DataAspectRatioMode = auto DrawMode = normal FontAngle = normal FontName = Helvetica FontSize = [12] FontUnits = points FontWeight = normal GridLineStyle = : Layer = bottom LineStyleOrder = - LineWidth = [0.5] MinorGridLineStyle = : NextPlot = replace 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 Title = [103.004] Units = normalized View = [0 90] XColor = [0 0 0] XDir = normal XGrid = off XLabel = [104.005] XAxisLocation = bottom XLim = [20 60] XLimMode = manual XMinorGrid = off XMinorTick = off XScale = linear XTick = [20 30 40 50 60] XTickLabel = 20 30 40 50 60 XTickLabelMode = auto XTickMode = auto YColor = [0 0 0] YDir = normal YGrid = off YLabel = [105.003] YAxisLocation = left YLim = [0 2e+99] YLimMode = manual YMinorGrid = off YMinorTick = on YScale = log YTick = [0 1e+99 2e+99] YTickLabel = 0 1 2 YTickLabelMode = auto YTickMode = manual ZColor = [0 0 0] ZDir = normal ZGrid = off ZLabel = [107.001] ZLim = [-1 1] ZLimMode = auto ZMinorGrid = off ZMinorTick = off ZScale = linear ZTick = [-1 0 1] ZTickLabel = ZTickLabelMode = auto ZTickMode = auto BeingDeleted = off ButtonDownFcn = Children = [106.001] 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 >> set(ax1(1),'ytick',10.^[-10:10:40]) >> help plotyy PLOTYY Graphs with y tick labels on the left and right. PLOTYY(X1,Y1,X2,Y2) plots X1 versus Y1 with y-axis labeling on the left and plots X2 versus Y2 with y-axis labeling on the right. PLOTYY(X1,Y1,X2,Y2,FUN) uses the plotting function specified by the string FUN instead of PLOT to produce each plot. FUN should be a plotting function like 'plot','semilogx','semilogy', 'loglog','stem', etc. that accepts the syntax H = FUN(X,Y). PLOTYY(X1,Y1,X2,Y2,FUN1,FUN2) uses FUN1(X1,Y1) to plot the data for the left axes and FUN2(X1,Y1) to plot the data for the right axes. [AX,H1,H2] = PLOTYY(...) returns the handles of the two axes created in AX and the handles of the graphics objects from each plot in H1 and H2. AX(1) is the left axes and AX(2) is the right axes. See also PLOT. >> help legend LEGEND Graph legend. LEGEND(string1,string2,string3, ...) puts a legend on the current plot using the specified strings as labels. LEGEND works on line graphs, bar graphs, pie graphs, ribbon plots, etc. You can label any solid-colored patch or surface object. The fontsize and fontname for the legend strings matches the axes fontsize and fontname. LEGEND(H,string1,string2,string3, ...) puts a legend on the plot containing the handles in the vector H using the specified strings as labels for the corresponding handles. LEGEND(M), where M is a string matrix or cell array of strings, and LEGEND(H,M) where H is a vector of handles to lines and patches also works. LEGEND(AX,...) puts a legend on the axes with handle AX. LEGEND OFF removes the legend from the current axes. LEGEND(AX,'off') removes the legend from the axis AX. LEGEND HIDE makes legend invisible. LEGEND(AX,'hide') makes legend on axis AX invisible. LEGEND SHOW makes legend visible. LEGEND(AX,'show') makes legend on axis AX visible. LEGEND BOXOFF sets appdata property legendboxon to 'off' making legend background box invisible when the legend is visible. LEGEND(AX,'boxoff') sets appdata property legendboxon to 'off for axis AX making legend background box invisible when the legend is visible. LEGEND BOXON sets appdata property legendboxon to 'on' making legend background box visible when the legend is visible. LEGEND(AX,'boxon') sets appdata property legendboxon to 'off for axis AX making legend background box visible when the legend is visible. LEGH = LEGEND returns the handle to legend on the current axes or empty if none exists. LEGEND with no arguments refreshes all the legends in the current figure (if any). LEGEND(LEGH) refreshes the specified legend. LEGEND(...,Pos) places the legend in the specified location: 0 = Automatic "best" placement (least conflict with data) 1 = Upper right-hand corner (default) 2 = Upper left-hand corner 3 = Lower left-hand corner 4 = Lower right-hand corner -1 = To the right of the plot To move the legend, press the left mouse button on the legend and drag to the desired location. Double clicking on a label allows you to edit the label. [LEGH,OBJH,OUTH,OUTM] = LEGEND(...) returns a handle LEGH to the legend axes; a vector OBJH containing handles for the text, lines, and patches in the legend; a vector OUTH of handles to the lines and patches in the plot; and a cell array OUTM containing the text in the legend. LEGEND will try to install a ResizeFcn on the figure if it hasn't been defined before. This resize function will try to keep the legend the same size. Examples: x = 0:.2:12; plot(x,bessel(1,x),x,bessel(2,x),x,bessel(3,x)); legend('First','Second','Third'); legend('First','Second','Third',-1) b = bar(rand(10,5),'stacked'); colormap(summer); hold on x = plot(1:10,5*rand(10,1),'marker','square','markersize',12,... 'markeredgecolor','y','markerfacecolor',[.6 0 .6],... 'linestyle','-','color','r','linewidth',2); hold off legend([b,x],'Carrots','Peas','Peppers','Green Beans',... 'Cucumbers','Eggplant') See also PLOT. >> print -depsc fig1.eps >> exit