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

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 日

0 投票

set(handles.axes1,'visible', 'off');
This may solve

17 件のコメント

fefe fefe
fefe fefe 2015 年 6 月 19 日
編集済み: fefe fefe 2015 年 6 月 19 日
sorry but it doesn't work @B.k Sumedha
B.k Sumedha
B.k Sumedha 2015 年 6 月 19 日
What did u try?
fefe fefe
fefe fefe 2015 年 6 月 19 日
the code you gave me :set(handles.axes1,'visible', 'off'); @B.k Sumedha
B.k Sumedha
B.k Sumedha 2015 年 6 月 19 日
Have u used the correct handles name?
fefe fefe
fefe fefe 2015 年 6 月 19 日
編集済み: fefe fefe 2015 年 6 月 19 日
i think because my axes name is "axes1". is it rigth?
B.k Sumedha
B.k Sumedha 2015 年 6 月 19 日
In which part have you placed that
set(handles.axes,'visible','off');
Give us some part of the coding.
fefe fefe
fefe fefe 2015 年 6 月 19 日
% --- Executes during object creation, after setting all properties.
function axes1_CreateFcn(hObject, eventdata, handles)
paras2=imread('paras2.png'); %paras2 is my background image imagesc(paras2); set(handles.axes1,'visible', 'off')
fefe fefe
fefe fefe 2015 年 6 月 19 日
this is a part of my code @B.k Sumedha
fefe fefe
fefe fefe 2015 年 6 月 19 日
this is a part of my code @B.k Sumedha
B.k Sumedha
B.k Sumedha 2015 年 6 月 19 日
Use that just above the
function axes1_CreateFcn(hObject, eventdata, handles)
fefe fefe
fefe fefe 2015 年 6 月 19 日
it is not in the callback function of the axes1 that i shoul put it? I did what you said but it has not changed
fefe fefe
fefe fefe 2015 年 6 月 19 日
it is not in the callback function of the axes1 that i shoul put it? I did what you said but it has not changed
fefe fefe
fefe fefe 2015 年 6 月 19 日
hello did you abandon me @B.k Sumedha ?
B.k Sumedha
B.k Sumedha 2015 年 6 月 19 日
Its working fine for me.
fefe fefe
fefe fefe 2015 年 6 月 19 日
owww! i'm not lucky! can you please share me your code?? @B.k Sumedha
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 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

質問済み:

2015 年 6 月 19 日

回答済み:

2019 年 3 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by