Right-hand axis


You specify which traces should appear on the right-hand axis with the 'Right' parameter. For example if you included 'Right',[1 4:2:10 17] in the parameter list, then plt would put trace numbers 1,4,6,8,10, and 17 on the right axis and all other traces on the left axis. A slight shading is used behind the Trace IDs associated with the right hand axis so you can tell at a glance which traces belong to which axis. (You may disable that shading if you prefer. To see how to do that, look at the details of the TraceID parameter at Trace properties.) You can also tell which axis a trace is on by the shape of its cursor ('+' for left axis and 'o' for the right axis). You can optionally specify the label or the limits for the right hand axis by using the 'LabelYR' or 'YlimR' parameters respectively or by using cell array inputs with the 'LabelY' or 'Ylim' parameters. Note that if you enabled metric prefixes on the y-axis, this applies only to the left hand axis. The right hand axis uses standard scaling.


Cursoring the traces on the right or left hand axes is identical except for the shape of the cursor - a '+' for traces on the left axis and a 'o' for traces on the right axis. Different cursor shapes are used for the dual cursor.

Panning and zooming

The following controls affect both the main and auxiliary axes simultaneously: Panning and zooming the y-axis (which includes zooming with an expansion box and left/right clicking on the "zout" tag) is also normally done simultaneously on the right and left hand axes. This is called the "linked" mode. Sometimes however it is more convenient to adjust the left and right axes separately (i.e "unlinked"). To unlink the axes, simply click on the right hand axis label. The label will then appear between two divide signs as shown in this picture (i.e. the axes are "divided"). Click on the label again and the divide signs will disappear indicating that the axes are again linked.

Normally the axes are linked when plt initializes. However if  you want plt to start in unlinked mode, include the parameter 'AxisLink',0  in the plt argument list. Including 'AxisLink',1  tells plt to start in linked mode, although you will rarely do that since linked mode is the default anyway.

Regardless of the linked/unlinked status you can pan or zoom the right hand axis by right or left clicking on or near one of the right-hand axis tick labels (i.e. the 20,40,60,80, or 100 in this picture) and dragging them to the desired position. (As before left click/drag is for panning and right click/drag is for zooming).