www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/SpecifyingACustomFigureWindowExample.m

    %% Specifying a Custom Figure Window

% Copyright 2015 The MathWorks, Inc.


%% generate figure

% Create figure
figure1 = figure('Name','purple_background',...
'Color',[0.4784 0.06275 0.8941]);
colormap('hsv'); 

% Create subplot
subplot(1,1,1,'Parent',figure1); 
box('on');

% Create axis labels
xlabel('x-axis');
ylabel({'y-axis'})

% Create title
title({'Title'});

% Enable printed output to match colors on screen
set(figure1,'InvertHardcopy','off')