- 7
- 0
- 约2.03万字
- 约 15页
- 2017-03-06 发布于重庆
- 举报
精通MATLAB的Chap214
set(gco, Units , data ,...
HorizontalAlignment , left ,...
mmdraw是精通MATLAB工具箱中另一个有用GUI函数,它与mmtext十分相似,但更为复杂,此函数允许用户用鼠标在当前的坐标轴上画线并设置线的属性。
function mmdraw(arg1,arg2,arg3,arg4,arg5,arg6,arg7)
%MMDRAW Draw a Line and Set Properties Using Mouse.
%MMDRAW Draw a Line in the current axes using to the mose.
%Click at the starting point and drag to the end point
%In addition,properties can be given to the line.
%Properties are given in pairs,e.g.,MMDRW name vale...
%Properties:
%NAME VALUE (defult)
%color [y m c r g b {w} k] or an rgb in quotes: [r g b]
%style [-----{:}--.]
%mark [0 + . * x]
%width points for linewidth {0.5}
%size points for marker size {6}
%Examples:
%MMDRAW color r width 2 sets color to red and width to 2 points%MMDRAW mark + size 8 set marker type to +and size to 8 points
%MMDRAW color [1 5 0] set color to orange
%Copyright (c) 1996 by Prentice-Hall,Inc.
global MMDRAW_Hl MMDRAW_EVAL
if nargin==0
arg1= color ;arg2= w ;arg3= style ;arg4= : ;nargin=4;
end
if isstr(arg1) % initial call,set thing up
if isempty(Hf),error( No Figure Available. ),end
Ha=findobj(Hf, Type, axes );
if isempty(Ha),error( No Axes in Current Figure. ),end
set(Hf, Pointer , Crossh ,...%set up callback for line star
BackingStore , off ,...
WindowButtonDownFcn , mmdraw(1) )
figure(Hf)
MMDRAW_EVAL= mmdrw(99);%set up string to set attributes
for i=1:nargin
argi=eval(sprintf( arg%.of ,i));
MMDARW_EVAL=[MMDARW_EVAL , arg ];
end
MMDARW_EVAL=[MMDARW_EVAL ,) ];
elseif arg1==1 % callback is line start point
fp=get(gca, CurrentPoint ); %start point
set(gca, Userdata ,fp(1,1:2)) %store in axes userdata
set(gcf, WindowButtonMotionFcn , mmdraw(2) ,...
您可能关注的文档
- 病理学资料最终版.doc
- 百胜系统操作流程图.doc
- 监理周报1.doc
- 监理交底书(最新版).doc
- 监理基础知识类单选题.doc
- 监理现场安全管理程序.doc
- 省代耗材品种优势总结.doc
- 监理规划-百替御园华府.doc
- 盘点高考考场上不容忽视的16个细节.doc
- 省管县体制下县级政府公共服务能力研究.doc
- 伟明环保-市场前景及投资研究报告-境内业务稳健运行,印尼市场贡献边际增量.pdf
- 桂东县法院系统招聘考试真题2025.pdf
- 贵州省黔南布依族2026年中考三模物理试题及答案.pdf
- 贵州省黔南州2026年中考语文二模试卷附答案.pdf
- 贵州省铜仁市2026年中考语文二模试卷附答案.pdf
- 2026上半年安徽事业单位联考合肥市庐江县招聘36人备考题库及一套完整答案详解.docx
- 贵州省毕节市2026年中考语文一模试卷附答案.pdf
- 贵州省贵阳市南明区2026年中考语文一模试卷附答案.pdf
- 2026上半年安徽事业单位联考合肥市庐江县招聘36人备考题库及一套参考答案详解.docx
- 贵州省贵阳市白云区2026年中考二模物理试题附答案.pdf
原创力文档

文档评论(0)