2013-04-27 66 views
1

我有4個數字,我在Matlab中完成。問題是有一些空白,但我不知道如何從數字中刪除它們。在下圖中有一些我想刪除的空白處。此外,我想調整顏色欄開始和結束的圖像幀。所以如果有人可以請幫助我。 下面是從下面的腳本中顯示的4個數字,我已經編輯它們來解釋我想要的數字。 1st2nd3rd4th 這是我使用的代碼:通過刪除一些空白區域在Matlab中編輯一些數字

load('D:\Deakin\My papers\Hussein\MatFiles\k640_Sensor_Lights_On_2000mm-pgms.mat','stats'); 
ax(1)=subplot(1,2,1);imagesc(stats.std,[0 18]);colormap(jet(256)); title('(a)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+550 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\x640_Sensor_Lights_On_2000mm-pgms.mat','stats'); 
ax(2)=subplot(1,2,2);imagesc(stats.std,[0 18]);colormap(jet(256)); title('(b)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+550 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
h=colorbar('SouthOutside'); 
set(h, 'Position', [.1 .05 .8150 .05]); 
for i=1:2 
pos=get(ax(i), 'Position'); 
set(ax(i), 'Position', [pos(1) 0.1+pos(2) pos(3) 0.8*pos(4)]); 

end; 
set(findobj('type','axes'),'FontSize',20); 
set(gcf,'units','normalized','outerposition',[0 0 1 1]); 

figure(); 

load('D:\Deakin\My papers\Hussein\MatFiles\k640_Sensor_Lights_On_0500mm-pgms.mat','stats'); 
ax(1)=subplot(2,5,1);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(a)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\k640_Sensor_Lights_On_1000mm-pgms.mat','stats'); 
ax(2)=subplot(2,5,2);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(b)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\k640_Sensor_Lights_On_1500mm-pgms.mat','stats'); 
ax(3)=subplot(2,5,3);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(c)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\k640_Sensor_Lights_On_2000mm-pgms.mat','stats'); 
ax(4)=subplot(2,5,4);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(d)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\k640_Sensor_Lights_On_2500mm-pgms.mat','stats'); 
ax(5)=subplot(2,5,5);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(e)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\x640_Sensor_Lights_On_0500mm-pgms.mat','stats'); 
ax(6)=subplot(2,5,6);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(f)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\x640_Sensor_Lights_On_1000mm-pgms.mat','stats'); 
ax(7)=subplot(2,5,7);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(g)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\x640_Sensor_Lights_On_1500mm-pgms.mat','stats'); 
ax(8)=subplot(2,5,8);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(h)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\x640_Sensor_Lights_On_2000mm-pgms.mat','stats'); 
ax(9)=subplot(2,5,9);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(i)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\x640_Sensor_Lights_On_2500mm-pgms.mat','stats'); 
ax(10)=subplot(2,5,10);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(j)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
h=colorbar('SouthOutside'); 
set(h, 'Position', [.1 .05 .8150 .05]); 
for i=1:10 
pos=get(ax(i), 'Position'); 
set(ax(i), 'Position', [pos(1) 0.1+pos(2) pos(3) pos(4)]); 
end; 
set(findobj('type','axes'),'FontSize',20); 
set(gcf,'units','normalized','outerposition',[0 0 1 1]); 
figure(); 

load('D:\Deakin\My papers\Hussein\MatFiles\k640_Sensor_Heater_On_1000mm-pgms.mat','stats'); 
ax(1)=subplot(2,2,1);imagesc(stats.entropy,[0 4]);colormap(jet(256)); title('(a)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\k640_Sensor_Lights_On_1000mm-pgms.mat','stats'); 
ax(2)=subplot(2,2,2);imagesc(stats.entropy,[0 4]);colormap(jet(256)); title('(b)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\x640_Sensor_Heater_On_1000mm-pgms.mat','stats'); 
ax(3)=subplot(2,2,3);imagesc(stats.entropy,[0 4]);colormap(jet(256)); title('(c)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\x640_Sensor_Lights_On_1000mm-pgms.mat','stats'); 
ax(4)=subplot(2,2,4);imagesc(stats.entropy,[0 4]);colormap(jet(256)); title('(d)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+640 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
h=colorbar('SouthOutside'); 
set(h,'XTick',0:4); 
set(h, 'Position', [.1 .05 .8150 .05]); 
for i=1:4 
pos=get(ax(i), 'Position'); 
set(ax(i), 'Position', [pos(1) 0.1+pos(2) pos(3) 0.8*pos(4)]); 
end; 
set(findobj('type','axes'),'FontSize',20); 
set(gcf,'units','normalized','outerposition',[0 0 1 1]); 
figure(); 

load('D:\Deakin\My papers\Hussein\MatFiles\x640_Sensor_Lights_On_2500mm_with_interference_distance_1600-pgms.mat','stats'); 
ax(1)=subplot(1,3,1);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(a)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+550 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\x640_Sensor_Lights_On_2500mm_with_interference_distance_1350-pgms.mat','stats'); 
ax(2)=subplot(1,3,2);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(b)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+550 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
load('D:\Deakin\My papers\Hussein\MatFiles\x640_Sensor_Lights_On_2500mm_with_interference_distance_1100-pgms.mat','stats'); 
ax(3)=subplot(1,3,3);imagesc(stats.nlvls,[0 16]);colormap(jet(256)); title('(c)'); 
set(findobj('type','text'),'FontSize',20); 
h=get(gca,'Title'); 
P = get(h,'Position'); 
set(h,'Position',[P(1) P(2)+550 P(3)],'FontSize',20); 
set(gca,'FontSize',20); 
set(gca,'DataAspectRatio',[1 1 1]); 
axis off; 
h=colorbar('SouthOutside'); 
set(h, 'Position', [.1 .05 .8150 .05]); 
for i=1:3 
pos=get(ax(i), 'Position'); 
set(ax(i), 'Position', [pos(1) 0.1+pos(2) pos(3) 0.8*pos(4)]); 
end; 
set(findobj('type','axes'),'FontSize',20); 
set(gcf,'units','normalized','outerposition',[0 0 1 1]); 
figure(); 

回答

1

我所知道的兩種方法:

  • subplot('position',[left bottom width height])功能可以在標準化的座標系中的任意位置次要情節。

  • 將該數字轉換爲*.eps格式並在某些graphic software中手動刪除空格。如果您只需要爲出版目的準備一個數字,這是最好的。

相關問題