how can set "off" the visibility of axes in gui

조회 수: 16 (최근 30일)
fefe fefe
fefe fefe 2015년 6월 19일
답변: Andres Charris 2019년 3월 18일
I want to set a image as background of my gui and i don't want the axes to appear. I tried with set(axes1,'visible','off') also with set(axes1,'handlevisibility','off','visible','off'),but it does not work.I also try to set it manually in "property inspector",but it does not work. axes1 is the current axes. thanks in advance.

답변 (2개)

B.k Sumedha
B.k Sumedha 2015년 6월 19일
편집: B.k Sumedha 2015년 6월 19일
set(handles.axes1,'visible', 'off');
This may solve
  댓글 수: 17
B.k Sumedha
B.k Sumedha 2015년 6월 19일
Have a try with this
set(findobj(gcf, 'type','axes1'), 'Visible','off')
Álvaro Pauner Argudo
Álvaro Pauner Argudo 2017년 11월 24일
How can I hide the whole figure? Not only the axes

댓글을 달려면 로그인하십시오.


Andres Charris
Andres Charris 2019년 3월 18일
ant= get(hObject,'Value');
minFreq = 1;
maxFreq = 10;
t = 0:0.001:1;
% Get parameters from GUI
fs = get(handles.freqSlider,'Value');
freq = minFreq + fs * (maxFreq - minFreq);
amp = str2double(get(handles.amplEdit,'String'));
% Calculate data
x = amp * sin(2*pi*freq*t);
% Create time plot in proper axes
h=plot(t,x);
if ant==1;
h.Visible='on';
else
h.Visible='off';
set(handles.axes1,'Visible','off');
end

Community Treasure Hunt

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

Start Hunting!

Translated by