I have an application in which there are many charts.
One function draws the graphs and with another function I would like to delete these graphs. For example, in one graph I have such a drawing :
plot(app.UIAxes_5,app.AxeX,app.AxeY,'MarkerSize', 20)
Where app.AxeX,app.AxeY are multiple points loaded from a file.
Is it possible to delete it knowing only the data app.AxeX,app.AxeY, ?

답변 (1개)

DGM
DGM 2022년 10월 26일

0 개 추천

If you have a handle to the plot object
ph = plot(app.UIAxes_5,app.AxeX,app.AxeY,'MarkerSize', 20);
then you should be able to delete it
delete(ph);
So all you need to know is the handle. Either keep track of it somewhere, or you could find it as a descendant of UIAxes_5.

댓글 수: 2

Jakub Rolbiecki
Jakub Rolbiecki 2022년 10월 27일
Ok, can i creat a array of handle ?
And then delete current plot ?
How creat array like this ?
Jakub Rolbiecki
Jakub Rolbiecki 2022년 10월 27일
I am familiar with this method. I am asking about delete plot only based on data. Because creating an array with a plot object handle causes errors and does not work properly.

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

카테고리

도움말 센터File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

질문:

2022년 10월 26일

댓글:

2022년 10월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by