% for Q1:横坐标轴可否移动位置
clc;clear;close all;
t=linspace(0,8,100);
a1=axes;
plot(t,sin(t));
xt=get(gca,'xtick');
set(gca,'XTick',[],'XColor','w');
xL=xlim;
p=get(gca,'Position');
box off;
a2=axes('Position',p+[0,p(4)/2,0,-p(4)/2]);
xlim(xL);box off;
set(gca,'XTick',xt,'Color','None','YTick',[]);
% for Q2:坐标轴用两条直线来表示
figure;
axes;
% statement
set(gca,'XTick',[],'YTick',[],'Box','off');
a2=axes('Position',p+[0,p(4)/2,0,-p(4)/2]);
xlim(xL);box off;
set(gca,'XTick',xt,'Color','None','YTick',[]);
% for Q2:坐标轴用两条直线来表示
figure;
axes;
% statement
set(gca,'XTick',[],'YTick',[],'Box','off');
set(gcf,'color','w');
本文转自einyboy博客园博客,原文链接:http://www.cnblogs.com/einyboy/archive/2013/01/20/2868773.html,如需转载请自行联系原作者。