Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
matlab_figure_tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aerospace and Mechanical Engineering
tlambert
matlab_figure_tools
Compare revisions
44f20e2449e99c62dae634ff52d5be65fdceb214 to 4bba67d0a6a7ae607b1893ce43708e2d6233a656
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
am-dept/tlambert/matlab_figure_tools
Select target project
No results found
4bba67d0a6a7ae607b1893ce43708e2d6233a656
Select Git revision
Branches
main
Swap
Target
am-dept/tlambert/matlab_figure_tools
Select target project
am-dept/tlambert/matlab_figure_tools
1 result
44f20e2449e99c62dae634ff52d5be65fdceb214
Select Git revision
Branches
main
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
feat: add small figure handling helpers
· 4bba67d0
Thomas Lambert
authored
6 months ago
4bba67d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
initiatefig.m
+38
-0
38 additions, 0 deletions
initiatefig.m
savethisfig.m
+27
-0
27 additions, 0 deletions
savethisfig.m
with
65 additions
and
0 deletions
initiatefig.m
0 → 100644
View file @
4bba67d0
function
initiatefig
(
figname
,
keepFigOpen
)
% INITIATEFIG Initiate a new figure
% -----
%
% Syntax:
% TODO
%
% Inputs:
% TODO
%
% Output:
% TODO
%
%
% See also: plot.
% ----------------------------------------------------------------------------------------------
% (c) Copyright 2022-2024 University of Liege
% Author: Thomas Lambert <t.lambert@uliege.be>
% ULiege - Aeroelasticity and Experimental Aerodynamics
% MIT License
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if
~
keepFigOpen
close
(
findobj
(
'type'
,
'figure'
,
'name'
,
figname
));
pause
(
0.1
);
elseif
~
isempty
(
findobj
(
'type'
,
'figure'
,
'name'
,
figname
))
i
=
1
;
newFigName
=
figname
;
while
~
isempty
(
findobj
(
'type'
,
'figure'
,
'name'
,
newFigName
))
newFigName
=
sprintf
(
'%s -%d'
,
figname
,
i
);
i
=
i
+
1
;
end
figname
=
newFigName
;
end
figure
(
'Name'
,
figname
);
end
This diff is collapsed.
Click to expand it.
savethisfig.m
0 → 100644
View file @
4bba67d0
function
savethisfig
(
saveFig
,
figTitle
,
figDir
,
figName
)
% SAVETHISFIG Save the figure
% -----
%
% Syntax:
% TODO
%
% Inputs:
% TODO
%
% Output:
% TODO
%
%
% See also: plot.
% ----------------------------------------------------------------------------------------------
% (c) Copyright 2022-2024 University of Liege
% Author: Thomas Lambert <t.lambert@uliege.be>
% ULiege - Aeroelasticity and Experimental Aerodynamics
% MIT License
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
condsave2tikz
(
saveFig
,
figTitle
,
[
figDir
,
figName
],
'\normalsize'
);
pause
(
0.1
);
% Do not show them all at once
end
This diff is collapsed.
Click to expand it.