give private access to a figure in a class
3 views (last 30 days)
Show older comments
Alessandro on 12 Mar 2013
Hello I am building a class that accesses a figure and than manipulates the data of the figure. My problem is that a plot outside of my figure could destroy all the data of the figure.
the class definition:
classdef theVectorscope < handle
function obj = Myspecialfigure()
obj.thefig = figure();%Create a figure
obj.theaxis = axes('Position', [0.1, 0.1, .8, .8],'Parent',obj.thefig);
obj.pltlist = plot(rand(1,5,rand(1,5)),'Parent',obj.theaxis)%Making a simple plot
I tryed protected but the figure can still be manipulated outside of my class. Is it possible to make a protected figure with matlab classes ?
Find more on Graphics Object Properties in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!