images in the output. The pixel values act as a maximum size value because MATLAB maintains an
image’s aspect ratio. MATLAB ignores the size setting for the following cases:
• When working with external graphics as described in “External Graphics” on page 23-12
• When using vector formats, such as .eps
• When publishing to .pdf
Capturing Figures
You can capture different aspects of the Figure window by setting the Figure capture method
option. This option determines the window decorations (title bar, toolbar, menu bar, and window
border) and plot backgrounds for the Figure window.
This table summarizes the effects of the various Figure capture methods.
Use This Figure Capture
Method
To Get Figure Captures with These Appearance Details
Window Decorations
Plot Backgrounds
entireGUIWindow
Included for dialog boxes; Excluded for
figures
Set to white for figures; matches the
screen for dialog boxes
print
Excluded for dialog boxes and figures
Set to white
getframe
Excluded for dialog boxes and figures
Matches the screen plot background
entireFigureWindow
Included for dialog boxes and figures
Matches the screen plot background
Note Typically, MATLAB figures have the HandleVisibility property set to on. Dialog boxes are
figures with the HandleVisibility property set to off or callback. If your results are different
from the results listed in the preceding table, the HandleVisibility property of your figures or
dialog boxes might be atypical. For more information, see HandleVisibility.
Specifying a Custom Figure Window
MATLAB allows you to specify custom appearance for figures it creates. If the Use new figure option
in the Publish settings pane is set to true, then in the published output, MATLAB uses a Figure
window at the default size and with a white background. If the Use new figure option is set to
false, then MATLAB uses the properties from an open Figure window to determine the appearance
of code-generated figures. This preference does not apply to figures included using the syntax in
“External Graphics” on page 23-12.
Use the following code as a template to produce Figure windows that meet your needs.
% 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');
Output Preferences for Publishing
23-25
Précédent

- 815/1450

Suivant