PLOTYY Plot graphs with Y tick labels on left and right side (x1,y1,x2,y2) PLOTYY(x1,y1,x2,y2) plots y1 vs. x1 with y-axis labeling on left, and plots y2 vs. x2 with y-axis labeling on right. PLOTYY(x1,y1,x2,y2,y2label) places an optional y-label on the right side of the plot, since MATLAB doesn't normally support right-hand side y-labels. [ax,pl] = PLOTYY(x1,y1,x2,y2) returns the handles of the two axes created by plotyy in ax and the handles of the lines created by plotyy in pl. [ax,pl,ylab] = PLOTYY(x1,y1,x2,y2,y2label) also returns the handle of the text object used for y2label in ylab. PLOTYY(x1,y1,x2,y2,y2label,options) allows for an options vector as follows: OPTIONS(1) : 0 for linear x-axis, 1 for log x-axis OPTIONS(2) : 0 for linear y1-axis, 1 for log y1-axis OPTIONS(3) : 0 for linear y2-axis, 1 for log y2-axis OPTIONS(4:5) : x-axis limits, in form [xmin xmax] OPTIONS(6:7) : y1-axis limits, in form [y1min y1max] OPTIONS(8:9) : y2-axis limits, in form [y2min y2max] Specify NaN for any option to use default value. For example, plotyy(x1,y1,x2,y2,'',[0 1 0 1.5 3 nan nan 0 10]) plots y1 vs. x1, y2 vs. x2, with log y1-axis scaling an x-axis range of 1.5 to 3, the default y1-axis range, and a y2-axis range of 0 to 10.