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
Commits
7294d7ef
Commit
7294d7ef
authored
3 years ago
by
M. Hock
Browse files
Options
Downloads
Patches
Plain Diff
Changed and added some comments.
parent
d5d196c8
Branches
Branches containing commit
Tags
Tags containing commit
3 merge requests
!13
PreRelease_V0.1
,
!12
PreRelease_V0.1
,
!2
Fixed an error related to index table instead of structure. (publish/fileCompare)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
example.m
+40
-17
40 additions, 17 deletions
example.m
with
40 additions
and
17 deletions
example.m
+
40
−
17
View file @
7294d7ef
% test skript
%% Example Script
% This Script is meant to demonstrate the capabilities of the PlotID tool.
%% Clear Environment
clear
;
clc
;
close
all
;
addpath
(
'fcn_core'
,
'fcn_help'
);
addpath
(
'CI_files'
);
% Test scripts
...
...
@@ -7,9 +10,19 @@ try
delete
testdata_2
.
h5
;
end
%% Set ProjectID
% ProjectID
% TODO: decide how projectID and optionally ORCID will be implemented
% ORCID placed on startup (alternative?) - projectID as persistent
% otherwise dialogue?
ProjectID
=
'JL01'
;
%% Data
%
some random data
%
Creating Random Data to use as data-file
x
=
linspace
(
0
,
7
);
y
=
rand
(
1
,
100
)
+
2
;
...
...
@@ -31,42 +44,52 @@ h5create(fpath, "/y1", size(y1), "Datatype", class(y1))
h5write
(
fpath
,
"/x1"
,
x1
)
h5write
(
fpath
,
"/y1"
,
y1
)
%% Plotting
fig
(
1
)
=
figure
;
%% Plotting
% This is still part of a normal script to produce plots.
% Make sure to save each figure in a variable to pass to PlotID-functions.
fig
(
1
)
=
figure
;
plot
(
x
,
y
,
'-k'
);
box
off
set
(
gca
,
'TickDir'
,
'out'
,
'YLim'
,
[
0
,
4
]);
hold
on
%fig(2) =figure;
%fig(2) =
figure;
plot
(
x1
,
y1
,
'-r'
);
set
(
gca
,
'TickDir'
,
'out'
,
'YLim'
,
[
0
,
4
]);
%% Tag the plot
% PlotID Implementation starts here.
[
figs
,
ID
]
=
TagPlot
(
fig
,
ProjectID
);
%% call a dummy function
% Place for post-processing of the plot, or additional related code.
a
=
1
;
a
=
example_fcn
(
a
);
%%
p
ublishing
%%
P
ublishing
% Second part of plotID
% The functions needs the file location, the location of the data and the
% figure
% figure and can take several options.
% TODO add explanations for Options
path
.
script
=
mfilename
(
'fullpath'
);
% filename of the m.script
% file name of the data
% file name of the data
set
path
.
rdata
=
{
dataset1
,
dataset2
}
;
% don't forget the extension
Publish
(
path
,
ID
,
figs
,
'Location'
,
'local'
,
'Method'
,
'centraliced'
)
%% Second Plot with identical data to test centralized method
%
% fig2 =figure;
% plot(x,y,'-k');
% hold on
% plot(x1,y1,'-r');
%
% [fig2, ID] = TagPlot(fig2, ProjectID);
%
% Publish(path, ID, fig2, 'Location', 'local','Method','centraliced')
\ No newline at end of file
fig2
=
figure
;
plot
(
x
,
y
,
'-k'
);
hold
on
plot
(
x1
,
y1
,
'-r'
);
[
fig2
,
ID
]
=
TagPlot
(
fig2
,
ProjectID
);
Publish
(
path
,
ID
,
fig2
,
'Location'
,
'local'
,
'Method'
,
'centraliced'
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment