prompt line blocks access to figure

2 次查看(过去 30 天)
hi
i have this code line:
...
plot(x,y)
prompt = 'Choose a number';
the problem is that i need to look in the plot at some points before using the prompt command. when i use the 'pause' command it also doesn't help because the pause is cancelled after one mouse click
is there an elegant way to solve this?

采纳的回答

Vishal Rane
Vishal Rane 2013-6-13
You could add a pushbutton to the plot figure or a dialog box maybe, indicating to the user that they can use that button/dialog box to continue execution when they are done staring at the plot.
  4 个评论
noa
noa 2013-6-13
cool! is there any way I can set the location of where the box pops up?
Vishal Rane
Vishal Rane 2013-6-13
use this after the msgbox command
set(h,'Position',[400 400 100 50 ]) % [left bottom width height]
Explore more figure properties

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by