2016-08-05 2 views
1

Axis Parameters의 글꼴을 Arial로 변경해야합니다. 코드의 수정안은 무엇이 필요합니까? Arial Font에서 축 매개 변수를 이미 정의하고 있지만 작동하지 않습니다.
글꼴, 당신은 글꼴을 설정 한 후, drawnow 또는 pause 기능을 실행해야 업데이트하려면 : 감사축 매개 변수를 MATLAB의 Arial 글꼴로 변경하십시오.

newfigure = h_figure; 
% fsize=[0 0 9 7]*1.394; % Genesys 
fsize=[0 0 9 7]*1.394; % Framemaker 

set(newfigure,'PaperUnits','centimeters'); 
% Festlegen der Dimensionen in cm der gesamten Grafik + Ueberschrift 
set(newfigure,'PaperPosition',fsize); 
set(newfigure,'Position',fsize*254/6.1); 
figure(h_figure); 
ax1=axes('Position',[0 0 1 1],'Visible','off'); 

% copy the axes into the new figure 
%newaxes = copyobj(handles.axes2,newfigure); 
%set(ax1,'Position',[0.1475 0.11 0.7688 0.841],'FontSize',[10],'GridLineStyle','-'); 
set(ax1,'Position',[0.5 0.11 0.7688 0.5],'FontSize',[20],'FontName','Arial','GridLineStyle','-','MinorGridLineStyle','-'); % Ra. 5.7.13 
% print the new figure 

%pos=0; 
    pos=findstr(image_name, 'color'); % für farbige Plots! 
    if isempty(pos) 
     %print(newfigure,'-deps','-tiff',image_name); 
     print(newfigure,'-dsvg',image_name); %--------------------------------------------------------------------------------------------------------------- NEW MODIFICATION 
    else 
     print(newfigure,'-depsc','-tiff',image_name);  
    end 

% save smithchart 
savefiguresmith_cmd_ext(handles) 
%print(newfigure,'-deps','-tiff',filename); 
% close the new figure 
%close(newfigure) 
+0

시도 :

다음 코드 샘플을 참조하십시오. – Hoki

+0

어떤 운영 체제 및 MATLAB 버전입니까? – Suever

+0

Matlab 2015 버전 및 32 비트 Windows 7 운영 체제 – KHAN6691

답변

0

은 내가 문제를 발견 한 것 같아요. 부모`figure` 대신`axes`의 속성을 변경하는

figure; 
ax1 = gca; 
plot(-pi:0.1:pi, sin(-pi:0.1:pi), 'Parent', ax1); 
for i = 1:10 
    set(ax1, 'FontSize',20,'FontName','Arial') 
    drawnow 
    pause(0.5); 
    set(ax1, 'FontSize',20,'FontName','Courier New') 
    drawnow 
    pause(0.5); 
end 
관련 문제