MATLAB Object-Oriented Programming

(Joyce) #1

Use the LineGraph Class


The LineGraph class defines the simple API specified by the graph base class and
implements its specialized type of graph:


d.x = 1:10;
d.y = rand(10,1);
lg = graphics.LineGraph(d,'LineColor','b','LineType',':');
lg.draw;
lg.addButtons;


Clicking the Zoom In button shows the zoom method providing the callback for the
button.


Define an Interface Superclass
Free download pdf