用了分子谱线数据,matlab画图与python的matplotlib库函数是一样的。
%import data
[x80,y80]=textread('Adata_cut/A8_158228-158680.txt');
[x81,y81]=textread('/home/luoluo/Documents/python_scripts/job__XCLASS/job__C2H5OH_A/A8/xclass_spectrum_output.dat');
[x82,y82]=textread('/home/luoluo/Documents/python_scripts/job__XCLASS/job__CH3COCH3_A/A8/xclass_spectrum_output.dat');
[x83,y83]=textread('/home/luoluo/Documents/python_scripts/job__XCLASS/job__CH3OCHO_v18=1_A/A8/xclass_spectrum_output.dat');
[x84,y84]=textread('/home/luoluo/Documents/python_scripts/job__XCLASS/job__CH3OCHO_v=0_A/A8/xclass_spectrum_output.dat');
[x85,y85]=textread('Bdata_cut/B8_158228-158680.txt');
[x86,y86]=textread('/home/luoluo/Documents/python_scripts/job__XCLASS/job__C2H5OH_B/B8/xclass_spectrum_output.dat');
[x87,y87]=textread('/home/luoluo/Documents/python_scripts/job__XCLASS/job__CH3COCH3_B/B8/xclass_spectrum_output.dat');
[x88,y88]=textread('/home/luoluo/Documents/python_scripts/job__XCLASS/job__CH3OCHO_v18=1_B/B8/xclass_spectrum_output.dat');
[x89,y89]=textread('/home/luoluo/Documents/python_scripts/job__XCLASS/job__CH3OCHO_v=0_B/B8/xclass_spectrum_output.dat');%plot
figure(1);
subplot(2,1,1);
subplot('Position',[0.13 0.52 0.77 0.37]);
plot(x80,y80,'k-',x81,y81,'r-',x82,y82,'g-',x83,y83,'cyan',x84,y84,'b','LineWidth',1.5);
axis([158228 158680 -1 15]);
set(gca,'xlim',[158228 158680]);
set(gca,'xTick',[158228:50:158680]);
set(gca,'yLim',[0 15]);
set(gca,'yTick',[-1:2:15]);
xlabel('Freq(MHz)');
ylabel('T(K)');
legend('DATA','C2H5OH','CH3COCH3','CH3OCHO v18=1','CH3OCHO v=0','Location','northwest','Orientation','vertical');
text(158630,13,'IRAS16293A');
%fontsizesubplot(2,1,2);
plot(x85,y85,'k-',x86,y86,'r-',x87,y87,'g-',x88,y88,'cyan',x89,y89,'b','LineWidth',1.5);
axis([158228 158680 -1 15]);
set(gca,'xlim',[158228 158680]);
set(gca,'xTick',[158228:50:158680]);
set(gca,'yLim',[0 15]);
set(gca,'yTick',[-1:2:15]);
xlabel('Freq(MHz)');
ylabel('T(K)');
legend('DATA','C2H5OH','CH3COCH3','CH3OCHO v18=1','CH3OCHO v=0','Location','northwest','Orientation','vertical');
text(158630,13,'IRAS16293B');