来源:http://wenku.baidu.com/link?url=m_eEkzbjnT9ccgAnlPVDqHCVyrZOD2EplXxxIiQc69DI0lHAWzwpZXfdDy_7DPbwIXC4t6c1zi9WfI5dlf6HETC1Mc69FjAAPstpIic_hBe
代码:
function [ax,hlines] = plotyyy(x1,y1,x2,y2,x3,y3,ylabels)
%PLOTYYY - Extends plotyy to include a third y-axis
%Syntax: [ax,hlines] = plotyyy(x1,y1,x2,y2,x3,y3,ylabels)
%Inputs: x1,y1 are the xdata and ydata for the first axes' line
% x2,y2 are the xdata and ydata for the second axes' line
% x3,y3 are the xdata and ydata for the third axes' line
% ylabels is a 3x1 cell array containing the ylabel strings
%Outputs: ax - 3x1 double array containing the axes' handles
% hlines - 3x1 double array containing the lines' handles
%Author: Denis Gilbert, Ph.D., physical oceanography
%Maurice Lamontagne Institute
%Dept. of Fisheries