Labels and figure properties

 

 

 

Title

plt(...,'Title',t);
Inserts the title string t above the plot area. 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, include the string [TexOff] anywhere in the title. (The [TexOff] string will be deleted from the title before display). Alternatively you could disable the Tex interpreter after the call to plt with the following command:

set(get(gca,'title'),'interpreter','none');

Default: no title
 

LabelX

plt(...,'LabelX',s);
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: plt(...,'LabelX',{'left x label' 'right x label');
Default: 'x axis'
 

LabelY

plt(...,'LabelY',s);
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, 'LabelY',{'ab' 'cd'} is equivalent to 'LabelY','ab','LabelYR','cd'. If there are subplots, the right hand axis label must come last. For example with 3 subplots:
 plt(...,'SubPlot',[50 20 30],'LabelY',...
   {'lower-axis' 'middle-axis' 'upper-axis' right-hand-axis'});

Default: 'Y axis (Left)'
 

LabelYR

plt(...,'LabelYR',s);
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)'
 

FigName  

plt(...,'FigName',f);
Uses string f as the name for the plt figure window.
Default: 'plt'
 

Position

plt(...,'Position',[x(left) y(bottom) height width]);
Specify the figure size and position on the screen in pixels. If the height 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. (Obviously 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 figure windows are exactly on top of each other. This feature makes it less likely that you will loose track 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 45 700 525], or if subplots are enabled: [9 45 840 570]
 

Fig

Normally plt opens a new figure window when it is called. In rare situations one may want to tell plt to use a pre-existing figure instead. This parameter allows you to specify a figure window to use. This parameter is different from the other parameters in that it only works if it is included as the first argument in the calling sequence. (The parameter is ignored otherwise.) For example, to open plt using figure number 4, you would use plt('Fig',4,...);