clear all
close all
load yi.txt
a=yi;
b={'北京' '天津' '石家庄' '唐山' '秦皇岛' '太原' '呼和浩特' '包头'...
'沈阳' '大连' '丹东' '锦州' '长春' '吉林' '哈尔滨'...
'牡丹江' '上海' '南京' '无锡' '徐州' '扬州' '杭州'...
'宁波' '温州' '金华' '合肥' '蚌埠' '安庆' '福州'...
'厦门' '泉州' '南昌' '九江' '赣州' '济南' '青岛'...
'烟台' '济宁' '郑州' '洛阳' '平顶山' '武汉' '宜昌'...
'襄阳' '长沙' '岳阳' '常德' '广州' '韶关' '深圳'...
'湛江' '惠州' '南宁' '桂林' '北海' '海口' '三亚'...
'重庆' '成都' '泸州' '南充' '贵阳' '遵义' '昆明'...
'大理' '西安' '兰州' '西宁' '银川' '乌鲁木齐'};
numofmonth=size(a,1);
for ii=1:1
figure
set(gcf,'visible','on')
set(gcf,'color',[0.96 0.96 0.96],'position',[300 100 750 500])
ys=rand(1,3);
plot(a(:,ii),'-r.','markersize',15,'markerfacecolor',ys,...
'markeredgecolor',ys,'color',ys,'linewidth',1)
hold on;
set(gca,'color',[0.96,0.96,0.96],'position',[0.08,0.08,0.9,0.86],'fontweight','bold')
xlabel('时间','fontweight','bold')
ylabel('相对房价','fontweight','bold')
title(b{ii},'fontweight','bold')
set(gca,'xtick',3:6:numofmonth,'xticklabel',{'11/03','11/09','12/03','12/09','13/03','13/09', '14/03','14/09','15/03'},'tickdir','in')
ylim=get(gca,'ylim');
n=30;
bl=1/3;
qujian=0.99*diff(ylim);
len0=qujian/(n+n*bl-bl);
len1=len0*bl;
for jj=3:3:numofmonth
for kk=1:n
plot(jj*ones(2,1),[ylim(1)+(len0+len1)*(kk-1)+1/198*qujian,ylim(1)+(len0+len1)*(kk-1)+len0+1/198*qujian], '-','linewidth',0.8,'color',[250 128 114]/255);
end
end
xlim([0 numofmonth+1])
set(gcf,'InvertHardcopy','off');
set(gcf,'PaperPositionMode','auto')
print(gcf,b{ii},'-djpeg','-r300')
end