Make figure data not accessible

Greetings.
I am building a GUI with GUIDE, which contains also a data plot. I would like to allow the users to edit the graphical appearance of the plot created by my application (as by using the set(hObject,'Toolbar','figure') command), but I don't want them to have access to the numerical underlying data (as obtained by lineseries XData and YData). Any idea?
Moreover, the set(hObject,'Toolbar','figure') command allows the user to change the appearance of any object in the GUI, is it possible to restrict its use only to the plot?
Thanks.

답변 (3개)

Sean de Wolski
Sean de Wolski 2013년 4월 5일

0 개 추천

Set the 'HandleVisibility' and 'HitTest' of any graphics object you don't want available to 'off'
Crymage
Crymage 2013년 4월 5일

0 개 추천

Thanks for your quick reply.
Your suggestion solved the second part of the problem. As a sidenote, an user who has changed the ShowHiddenHandles property would still be able to edit the appearance of the other objects?
Still waiting for any advice on how to "protect" the data, since I would like the user to be able to change the appearance of the dataseries (and then I can't use your suggestion in this case, I believe).
Jan
Jan 2013년 4월 5일
편집: Jan 2013년 4월 5일

0 개 추천

The user can re-enable the visibility of the handles easily and obtaint the handles of the objects by e.g. findall also, even with disabled HandleVisibility. So disabling the HandleVisibility prevents accidental changes, but not intented ones.
Therefore my answer is: You can't. Matlab allows to access the graphic objects. and blocking this securely does not match the design of Matlab.

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

질문:

2013년 4월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by