How to plot on a current figure ?

조회 수: 3 (최근 30일)
Momo76800
Momo76800 2015년 8월 26일
댓글: Momo76800 2015년 8월 26일
Good morning everyone !
I have a function returning a figure.
So, i plot that figure on a step of my code, but i would like to modify this figure later in my code.
This function " h_fig = display(RGBtriplet) " is composed of a slider and an axes. I have a function " SliderCallbacks" for the slider, and mysubplot(RGB,cur_serial) allowing to plot on the axes according to the value of the cur_serial ( corresponding to one image ).
I thought i would modify the plot of my axes ( mysubplot) out of my function but i don't know how, or if it's the best solution. I wanted to manipulate the handles but i didn't succeed to ^^".
If you have any idea, please let me know. If you want the whole code of my function, do not hesitate.
Have a nice day !

답변 (1개)

Walter Roberson
Walter Roberson 2015년 8월 26일
subax = findobj(h_fig, 'type', 'axes');
now subax is a vector of the axes handles from within h_fig . You can modify the properties. For example,
set(subax, 'Visible', 'off');
  댓글 수: 1
Momo76800
Momo76800 2015년 8월 26일
hm i don't know if i'm not clear enough or if i don't understand your answer . This action is only to not making visible my axes no ? How do i do if i want to use my function later, but to plot on the same axes of my first figure ? Is there any way to not create a new figure, but only recall my function, but only modify the axes ?
For instance : h_fig = display(RGBtriplet1) (i have a figure with a slider and a scan ) . . . h_fig = display(Myerosion) ( i have not got a new figure that appears, but my axes are modify by an another scan ).
Do you see what i mean?

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

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by