matlab gui如何画矩形,matlab如何在gui的uipanel中画图

function show_nodes_figure()

%节点分布图

global X;

global Y;

global base;

global nodes_num;

global E0;

global E_da;

global E_elec;

global E_fs;

global E_mp;

global d0;

global Nodes;

clf

hold on

for i=1:nodes_num

plot(Nodes{i}{1}.x,Nodes{i}{1}.y,'or ','MarkerSize',5);

end

axis([0,X,0,Y]);

set(gca,'xtick',[0:X/12:X]); %设置网格密度

set(gca,'ytick',[0:Y/12:Y]);

grid on;

xlabel('X');

ylabel('Y');

title('节点分布图')

hold off

如图,我点击运行main.m进入如下界面

bVqVyv

输入数据运行后会调用上面的show_nodes_figure函数,但是此函数产生图像将整个main的面板覆盖了,我怎么设置将图像画在左下角的uipanel(节点信息传输图中)

(整个图像被覆盖了)

bVqVyC

下面是main.m代码

function varargout = main(varargin)

% MAIN MATLAB code for main.fig

% MAIN, by itself, creates a new MAIN or raises the existing

% singleton*.

%

% H = MAIN returns the handle to a new MAIN or the handle to

% the existing singleton*.

%

% MAIN('CALLBACK',hObject,eventData,handles,...) calls the local

% function named CALLBACK in MAIN.M with the given input arguments.

%

% MAIN('Property','Value',...) creates a new MAIN or raises the

% existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before main_OpeningFcn gets called. An

% unrecognized property name or in

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值