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 ExchangeCreating, 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