필터 지우기
필터 지우기

Turning the visability of the lines of a plot to 'off' if app.UIAxis.Visible = 'off' doesnt hide them.

조회 수: 6 (최근 30일)
I have an output plot that is created in a startup function in app designer that when a button is pressed I would like to hide.
I have used app.UIAxis.Visible = 'off' and this removes the axis, grid lines etc but not the actual line of the plot.
Is there a way to hide a plotted line on the callback of a pushed button on the same app designer canvas?
Thanks in advance
(Using R2019a)LinePlot3.JPG

채택된 답변

Walter Roberson
Walter Roberson 2019년 4월 2일
set( findobj(app.UIAxis.Children, '-type', 'line'), 'Visible', 'off')
  댓글 수: 2
Hawki005
Hawki005 2019년 4월 5일
Had to remove the hyphen in the 'type' string and then this worked perfectly (this may have just been a typing error?). Thank you!
Walter Roberson
Walter Roberson 2019년 4월 5일
Good point. findobj() uses a mix of keywords, some of which have leading hyphen and some of which do not.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by