标签:
clc; clear all; close all;
x1 = 0:.1:40; y1 = 4 * cos(x1)./(x1 + 2); x2 = 1:.2:20; y2 = x2.^2 ./ x2.^3; h11 = line(x1,y1,‘Color‘,‘r‘); ax1 = gca; aa = get(ax1,‘position‘); aa(1:2) = aa(1:2) + .1; aa(3:end) = aa(3:end) - .2; % aa(1:2) = aa(1:2)+1 set(ax1,‘XColor‘,‘r‘,‘YColor‘,‘r‘); ax2 = axes(‘position‘,aa,... ‘XAxisLocation‘,‘bottom‘,... ‘YAxisLocation‘,‘left‘,... ‘Color‘,‘none‘,... ‘XColor‘,‘k‘,‘YColor‘,‘k‘); h12 = line(x2,y2,‘Color‘,‘k‘,‘Parent‘,ax2);
标签:
原文地址:http://www.cnblogs.com/Kermit-Li/p/4639568.html