Graphics Previous page   Next Page

Simplified Calling Syntax

Object creation functions have convenience forms that allow you to use a simpler syntax. For example,

is equivalent to

Note that using the convenience form of an object creation function can cause subtle differences in behavior when compared to formal property name/property value syntax.

A Note About Property Names

By convention, MATLAB documentation capitalizes the first letter of each word that makes up a property name, such as LineStyle or XTickLabelMode. While this makes property names easier to read, MATLAB does not check for uppercase letters. In addition, you need use only enough letters to identify the name uniquely, so you can abbreviate most property names.

In M-files, however, using the full property name can prevent problems with futures releases of MATLAB if a shortened name is no longer unique because of the addition of new properties.


Previous page  High-Level Versus Low-Level Plot Objects Next page

© 1994-2005 The MathWorks, Inc.