matlab 画图
来源:互联网 发布:翻译英语音标软件 编辑:程序博客网 时间:2024/04/28 10:31
1.
hFH = imfreehand(); %Choose ROI using freehand tool
画出的是连续的图形.曲线自动闭合且只能画一次.
2.
类似点画线,任意图形.
S.fh = figure('units','pixels',...
'position',[300 300 400 400],...
'menubar','none',...
'name','GUI_39',...
'numbertitle','off',...
'resize','off');
S.ax = axes('units','pixels',...
'position',[20 20 360 350],...
'Xlim',[0 1],...
'YLim',[0 1],...
'drawmode','fast');
S.cm = uicontextmenu;
% Set the uicontextmenu to point to the axes.
set(S.ax, 'buttondownfcn',@ax_bdfcn,'uicontextmenu',S.cm)
hold on, box on % So that we don't overwrite with each new point drawn.
set(S.fh,'windowbuttonupfcn', @fh_wbufcn);
function [] = ax_bdfcn(varargin)
% ButtonDownFcn for the axes.
% We only want to do something if left clicking.
if strcmp(get(S.fh,'selectiontype'),'normal')
% We want to plot dots as long as user holds down mouse button.
set(S.fh, 'windowbuttonmotionfcn', @fh_wbmfcn)
end
end
function [] = fh_wbmfcn(varargin)
% The windowbuttonmotionfcn for figure, while button is held only.
pt = get(S.ax, 'currentpoint');
plot(pt(1),pt(3),'.','buttondownfcn',@ax_bdfcn,'color',S.COL);
end
function [] = fh_wbufcn(varargin)
% WindowButtonUpFcn for the figure.
% We want to stop drawing dots when user lets mouse button up.
set(S.fh, 'windowbuttonmotionfcn', '');
end
- matlab画图
- matlab 画图
- matlab 画图
- matlab 画图
- MatLab 画图
- matlab画图
- matlab 画图
- matlab画图
- matlab 画图
- matlab画图
- matlab画图
- matlab画图
- Matlab画图
- matlab画图
- matlab 画图
- matlab---画图
- matlab画图
- matlab画图
- BW中写abap代码,实现特定逻辑
- I P B
- WinForm系列——单例运行
- ibatis配置xml文件中CDATA的用法
- ANDROID源代码结构
- matlab 画图
- 几个运维监控工具的比较
- Java通用进程模型设计
- 《Android学习指南》目录
- 并发小工具
- IBatisNet利用XML映射文件解析
- android开发系列文章集合
- 动态链接库的简单应用
- USACO Section 4.3 Buy Low, Buy Lower - DP+大数加法