Home > Archive > Matlab > November 2005 > Slient axes command
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Slient axes command
|
|
| Jean-Yves Tinevez 2005-11-29, 4:03 am |
| Good day to you all.
I have a GUI where the user enters various parameters. When one
parameter is changed, the GUI update à figure, which is plotted on
another figure (different from the GUI one).
The figure in question is called by the command axes, which have an
annoying behaviour : it steals the focus from the GUI figure and
raise the plotting figure on top. I find this annoying, because the
user have to enter several parameters in a row, by switching through
many input boxes in the GUI figure.
Someone in the File Exchange proposed a script called 'sfigure' that
create a figure silently without stealing the focus and bringing this
figure to the top. I might have misused it but it didn't work for me.
I was wondering : how could one tweak the command 'axes' so that it
would not steal the focus and update silently the plotting figure ?
| |
| Jérôme 2005-11-29, 4:03 am |
| Hi,
I think you should use SET/GET instead of AXES :
<http://www.mathworks.com/support/te.../1200/1205.html>
Try this :
figure('units','normalized',...
'position',[.3 .3 .4 .4])
axes('tag','ax')
figure('units','normalized',...
'position',[.1 .3 .4 .4])
uicontrol(gcf,'string','A','callback', ...
'set(findobj(''tag'',''ax''),''color'',r
and(1,3))');
uicontrol(gcf,'units','normalized',...
'position',[.05 .2 .1 .1],...
'string','B','callback', ...
['axes(findobj(''tag'',''ax''));'...
'set(gca,''color'',rand(1,3))']);
See difference between buttons A & B
Jérôme
| |
| Jean-Yves Tinevez 2005-11-30, 4:02 am |
| Jérôme wrote:
> [snip.]
It's perfectly working. Thanks Jérôme, also for the help on the other
thread.
|
|
|
|
|