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.

Answers (3)

Sean de Wolski
Sean de Wolski on 5 Apr 2013
Set the 'HandleVisibility' and 'HitTest' of any graphics object you don't want available to 'off'
Crymage
Crymage on 5 Apr 2013
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 on 5 Apr 2013
Edited: Jan on 5 Apr 2013
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.

Categories

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

Asked:

on 5 Apr 2013

Community Treasure Hunt

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

Start Hunting!