2011-01-09 133 views
1


我正在計劃一個簡單的MATLAB實驗。我需要在屏幕上打印一個彩色文字,倒置。我發現功能在屏幕上顯示文本 - MATLAB

text(0.6,0.5,'red','rotation',180,'fontsize',50,'color','k') 

但我想擺脫軸(x和y)的,我想只是文本在屏幕的中央呈現..
任何想法,將appriciated。
阿里爾

回答

6
figure 
set(gcf,'Color', 'white') 
text(0.6,0.5,'red','rotation',180,'fontsize',50,'color','r') 
set(gca,'Color','white'); 
set(gca,'XColor','white'); 
set(gca,'YColor','white'); 
+0

感謝,它可以幫助,但我仍然有一個灰色的背景?我怎樣才能用白色填充它? – user552231 2011-01-09 11:03:12

4

或者:

figure('Color','white', 'Menu','none') 
text(0.5, 0.5, 'red', 'Rotation',180, 'FontSize',50, 'Color','k', ... 
    'HorizontalAlignment','Center', 'VerticalAlignment','Middle') 
axis off 

alt text