namefig

NAMEFIG Create or focus a figure with a specific name and set its properties.
0 Downloads
Aktualisiert 16. Jun 2024

Lizenz anzeigen

% NAMEFIG Create or focus a figure with a specific name and set its properties.
%
% FIG = NAMEFIG(NAME) creates a new figure with the specified NAME if
% it does not already exist. If a figure with the specified NAME
% exists, it brings the figure to the front.
%
% FIG = NAMEFIG(NAME, 'PropertyName', PropertyValue, ...) sets the
% specified properties of the figure. If 'size' is specified as a
% property name, it sets the size of the figure window.
%
% Example:
% fig1 = namefig('MyFigure', 'size', [400 300]);
% fig2 = namefig('AnotherFigure', 'Color', 'r', 'NumberTitle', 'off');
%
% Inputs:
% NAME - A string specifying the name of the figure.
%
% Optional Property-Value Pairs:
% 'size' - A vector [width height] specifying the size of the figure window.
% Other - Any valid figure property name and its corresponding value.
%
% Outputs:
% FIG - The handle to the created or existing figure.
%
% Notes:
% - If 'size' is specified, it overrides the default size of the figure.
% - Other property-value pairs are applied to the figure using the SET function.
% - If an invalid property name is specified, a warning is displayed.
%
% See also FIGURE, SET, FINDOBJ.

Zitieren als

宏樹 長嶋 (2024). namefig (https://www.mathworks.com/matlabcentral/fileexchange/168211-namefig), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2024a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Tags Tags hinzufügen

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0