Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
plotID_matlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
plotID
plotID_matlab
Merge requests
!22
Closes
#56
, Fixes
#68
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Closes
#56
, Fixes
#68
68-label-position-und-rotation
into
development
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Lemmer, Jan
requested to merge
68-label-position-und-rotation
into
development
3 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
Closes
#68 (closed)
, Close
#56 (closed)
0
0
Merge request reports
Compare
development
development (base)
and
latest version
latest version
ed6c2674
1 commit,
3 years ago
1 file
+
18
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
+PlotID/TagPlot.m
+
18
−
9
Options
@@ -14,10 +14,11 @@ function [figs, IDs] = TagPlot(figs, options)
arguments
figs
(
1
,:)
{
mustBeFigure
}
options
.
ProjectID
(
1
,:)
{
mustBeText
}
=
''
options
.
Fontsize
(
1
,
1
)
{
mustBeInteger
}
=
8
options
.
Fontsize
(
1
,
1
)
{
mustBeInteger
}
=
8
options
.
Color
(
1
,
3
)
{
mustBeNonnegative
}
=
0.65
*
[
1
1
1
]
% grey
options
.
Location
(
1
,:)
{
mustBeText
}
=
'east'
options
.
Position
(
1
,
2
)
{
mustBeVector
}
=
[
1
,
0.4
]
% default for east
options
.
Rotation
(
1
,
1
)
{
mustBe
Integer
}
=
0
options
.
Rotation
(
1
,
1
)
{
mustBe
Real
}
=
NaN
end
if
isempty
(
options
.
ProjectID
)
@@ -41,16 +42,19 @@ end
switch
options
.
Location
case
'north'
options
.
Position
=
[
0.4
,
0.95
];
options
.
Rotation
=
0
;
Rotation
=
0
;
case
'east'
options
.
Position
=
[
1
,
0.4
];
options
.
Rotation
=
90
;
Rotation
=
90
;
case
'south'
options
.
Position
=
[
0.4
,
.
02
];
options
.
Rotation
=
0
;
Rotation
=
0
;
case
'west'
options
.
Position
=
[
.
05
,
0.4
];
options
.
Rotation
=
90
;
Rotation
=
90
;
case
'southeast'
options
.
Position
=
[
0.8
,
.
02
];
Rotation
=
0
;
case
'custom'
% Check if Position is valid
if
~
all
(
0
<=
options
.
Position
&
options
.
Position
<=
1
)
@@ -62,6 +66,10 @@ switch options.Location
options
.
Location
=
'east'
;
options
.
Position
=
[
1
,
0.4
];
end
if
~
isnan
(
options
.
Rotation
)
Rotation
=
options
.
Rotation
;
end
IDs
=
cell
(
numel
(
figs
),
1
);
for
n
=
1
:
numel
(
figs
)
@@ -72,10 +80,11 @@ for n = 1:numel(figs)
ylim
=
get
(
axes
,
'YLim'
);
xlim
=
get
(
axes
,
'XLim'
);
%ID
position
=
[
options
.
Position
(
1
)
*
xlim
(
2
),
options
.
Position
(
2
)
*
ylim
(
2
)];
position
=
[
options
.
Position
(
1
),
options
.
Position
(
2
)];
text
(
axes
,
position
(
1
),
position
(
2
),
IDs
{
n
},
'Fontsize'
,
options
.
Fontsize
,
...
'Rotation'
,
options
.
Rotation
,
'VerticalAlignment'
,
'bottom'
,
'Color'
,
...
0.65
*
[
1
1
1
]
,
'BackgroundColor'
,
'w'
);
'Rotation'
,
Rotation
,
'VerticalAlignment'
,
'bottom'
,
'Color'
,
...
options
.
Color
,
'BackgroundColor'
,
'w'
,
'Units'
,
'normalized'
);
set
(
figs
(
n
),
'Tag'
,
IDs
{
n
});
end
Loading