how to set gui axes ylim

i created a axes object in gui and set ylim[-1 1] in property inspector,but the figure will be showed this
and i try to change parameter about ylim value form matlab program,but it just add one more new axes
what sould i solve this problem?and i couldn't find the function about axes in matlab program.should i creat a function for setting axes property?

3 Comments

axes('Parent',controller,...
'HandleVisibility','callback',...
'OuterPosition',[0.25 0.1 0.75 0.8],...
'Xlim',[0 10],...
'YLim',[-1 1],...
'Tag','axes1');
i put this program in slider callback function just for test the axes will be changed property or not
Stephen23
Stephen23 on 23 Mar 2017
Edited: Stephen23 on 23 Mar 2017
This command:
axes('Parent',controller,...);
will create new axes, because that is what it is supposed to do.
If you want to change the properties of existing axes, then you need to access its properties using set and get, or for newer MATLAB versions using dot notation:
thx for your correspond and i try for your answer.it is successful.

Sign in to comment.

Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Asked:

on 23 Mar 2017

Commented:

on 23 Mar 2017

Community Treasure Hunt

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

Start Hunting!