Inserts the title string t above the plot area.
s is usually a string, although it may also be a cell array of strings to specify a multi-line title.
The Tex interpreter is used to render the string allowing entry of Greek and other special characters. If you don't want the Tex interpreter to be used, you can turn off the interpreter with a command such as:
A shorter (although more cryptic) way of turning off the interpret is to include the string [TexOff] anywhere in the first line of the title. (The [TexOff] string will be deleted from the title before display). That method works only for graph titles.
A set command similar to the one above may be used to change the fontsize or other title properties. The plot height is automatically shrunk by the amount needed to make room for the title assuming the default font size. If you increase the title font size you may need to adjust the plot size using the xy parameter described in the
If s is a number is will be converted to a string. For example:
will create a two line title with '123' as the first line and '7.88' as the second line.
Default: no title
Uses string s as the x-axis label. If you are using subplots with two columns, you may also specify the x-axis label for both the left and right columns of plots by using a cell array:
If there is only one column of subplots (or no subplots at all), the a cell array argument represents a multi-line axis label, as in:
Even when you have multiple X labels, you can still use multi-line labels, as in:
The Tex interpreter will be used by default for X and Y axis labels. If for some reason you want to disable the Tex interpreter, you can do so with a command such as:
Default: 'x axis'
Uses string s as the left hand y-axis label of the main plot. You can specify both the left and right labels by using a cell array. For example, if there are no subplots, both these lines are equivalent:
If there are subplots, the right hand axis label must come last. For example with 3 subplots:
plt(...,'SubPlot',[50 20 30],'LabelY',...
In a similar way as described for titles, if you specify a number for the X or Y axis label it will be automatically converted to a string. You may also use multi-line text for the Yaxis labels in a similar way as described above for the Xaxis labels. The demo program gpsLog.m is a good example of how to use multi-line text for both X and Y axis labels.
Default: 'Y axis (Left)'
Uses string s as the right hand y-axis label. The 'right' parameter should also be included in this case, however if you don't, plt will default to placing the last trace on the right hand axis. Note that using a cell array argument to the 'LabelY' parameter (described above) is usually a more convenient way to specify the y-axis label, and the 'LabelYR' parameter is primarily used in legacy code.
Default: 'Y axis (Right)'
Uses string f as the name for the plt figure window.
Specifies the figure size and position on the screen in pixels.
Since 9 and 55 are the default values for xLeft & yBottom respectively, the second form above (with xLeft and yBottom omitted) is equivalent to:
If you prefer conciseness, you may use 'Pos' as an abbreviation for 'Position'.
If the height is specified as zero, plt will choose a height so that a unit along the x-axis is the same as a unit along the y-axis (i.e.if you plot a circle, it would look like a circle and not an ellipse). If the width is specified as zero, plt chooses the width to meet the same condition. (You can't specify zero for both the height and the width). If you resize the figure window with the mouse, then the units along the x and y axes will no longer be equal (and a plotted circle may appear to be an ellipse). If you wish that the equal units property to be maintained even after the figure window is resized, you should follow the plt command with the command axis('equal').
If you specify the same position vector for more than one plt command, plt will add a small offset to all the figure window positions (except the first one) so that no two figures are exactly on top of each other. This feature makes it less likely that you will completely loose sight of one of the figures and also makes it much easier to select or move any figure with the mouse. If a second plt command specifies a position that differs from the first plt command by even one pixel, then this feature will not be engaged.
Default: [9 55 700 525] (if sublots are not used). With subplots, as you add more columns of axes the default width increases from 700 to a maximum of 980. As you add more axes to a column the default height increases slightly from 525 to a maximum of 600.
This parameter creates a HelpText pseudo object at the same time as the plt pseudo is being created. v is a string or cell array specifying the displayed text. When this argument is included in the plt argument list, right clicking on the menu box Help tag will toggle the help text on or off (unless the 'HelpFileR' argument is also included in the argument list). See the
| This parameter is used to force a group of plt figures to close when any member
of the group is closed. Consider the following sequence:
g = gcf;
This of course will create 3 plotting figures. Closing any one of the three figures will also cause the other two to close.
The link parameter is ignored if it is empty. This makes it easier to link figures created in a loop. For example, this loop creates five linked figures:
g = '';
if isempty(g) g=gcf; end;
The demo programs circles12, gpsLog, pub, pub2, and tasplt take advantage of this parameter.
| This parameter specifies a function that will be run when the plt window is
closed. The argument may be:
| Normally plt opens a new figure window when it
is called. In some situations you may want to tell plt to use a pre-existing
figure instead. (The most common reason this is done is to put more than one
plot into a single figure.) This parameter tells plt to do this and specifies which figure
window should be used. For example, to open plt using figure
number 4, you would use plt('Fig',4,...);.
More often you will probably use plt('Fig',gcf,...);
which will open plt in the current figure. Generally the plt parameters may be placed
anywhere in the parameter list, and in fact the Fig parameter is the only exception to
this. The Fig parameter must be placed either as the first or the last parameter in
the argument list. The Fig parameter is ignored otherwise. This restriction is due to
lazy programming more than any other reason, and the restriction might be removed in
a later release.
There are three example programs (afilt.m, plt50.m and pub3.m) which are described in the
There is also another method to create multiple plots in a single figure, and this makes use of the subplot parameter. (This is demonstrated by the subplt.m, subplt8.m, subplt16.m, subplt20.m, pub0.m, pub2.m, pltmap.m, and weight.m programming examples). You might not expect that there would be a need for two different methods for achieving the same end, but it turns out that each of these methods have their unique advantages. The subplot method (described in the