Developing Chart Classes - MATLAB & Simulink (original) (raw)

Main Content

Author your own class of custom chart objects

Define your own chart class by creating a subclass of theChartContainer base class. If you write scripts or functions for creating specialized visualizations and share them with others, consider creating a class implementation. Creating a class enables you to provide a convenient interface for your users. When they want to customize aspects of your chart, they can set properties rather than having to modify and rerun your graphics code. You design your own custom set of properties and control which ones your users can access. Users can modify properties at the command line or inspect them in the Property Inspector. Instances of your class are members of the graphics object hierarchy. As a result, your charts are compatible with many aspects of the graphics system. For more information, see Chart Development Overview.

Classes

Methods

expand all

setup Set up instance of chart container subclass
update Update instance of chart container subclass after setting properties
getAxes Get axes for chart container subclass
getLayout Get tiled chart layout for chart container subclass
getTheme Get figure theme of chart container subclass
getLegend Get legend object for legend mixin subclass
getColorbar Get colorbar object for colorbar mixin subclass

Topics

Chart Development Basics

Managing Properties and Methods