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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
plotID
plotID_matlab
Commits
1c89ab9e
Commit
1c89ab9e
authored
3 years ago
by
Lemmer, Jan
Browse files
Options
Downloads
Patches
Plain Diff
Add Demo File for NFDI4ing Conference
parent
49981311
No related branches found
No related tags found
2 merge requests
!13
PreRelease_V0.1
,
!12
PreRelease_V0.1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
PlotID_Demo.m
+66
-0
66 additions, 0 deletions
PlotID_Demo.m
with
66 additions
and
0 deletions
PlotID_Demo.m
0 → 100644
+
66
−
0
View file @
1c89ab9e
%% Example Script
% This Script is meant to demonstrate the capabilities of the PlotID tool.
%% Clear Environment
clear
;
clc
;
close
all
;
addpath
(
'CI_files'
);
% Test scripts
try
delete
testdata_2
.
h5
;
end
%% Set ProjectID
% ProjectID can also be set in the config file
% Leave empty for using the ID from the config file
ProjectID
=
'FST01'
;
%% Data
% Creating Random Data to use as data-file
x
=
linspace
(
0
,
7
);
y
=
rand
(
1
,
100
)
+
2
;
dataset1
=
'test_data.mat'
;
save
(
'test_data.mat'
,
'x'
,
'y'
);
% some data as .h5
x1
=
linspace
(
0
,
2
*
pi
);
y1
=
sin
(
x1
)
+.
5
*
sin
(
2
*
x1
)
+
2
;
% define file path & name
fpath
=
"./testdata_2.h5"
;
dataset2
=
'testdata_2.h5'
;
% create hdf5 file and dataset > write data to hdf5 file / dataset
h5create
(
fpath
,
"/x1"
,
size
(
x1
),
"Datatype"
,
class
(
x1
))
h5create
(
fpath
,
"/y1"
,
size
(
y1
),
"Datatype"
,
class
(
y1
))
h5write
(
fpath
,
"/x1"
,
x1
)
h5write
(
fpath
,
"/y1"
,
y1
)
%% 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
;
set
(
gcf
,
'Units'
,
'centimeters'
,
'PaperUnits'
,
'centimeters'
,
'PaperSize'
,[
9
7
],
...
'Position'
,[
5
5
9
7
]);
plot
(
x
,
y
,
'Color'
,
0.5
*
[
1
1
1
]);
box
off
;
hold
on
;
plot
(
x1
,
y1
,
'-k'
);
set
(
gca
,
'TickDir'
,
'out'
,
'YLim'
,
[
0
,
4
],
'YTick'
,[
0
:
1
:
4
],
'XLim'
,[
0
,
6
]);
%fstplt.setfiguresize('1/2ppt16:9');
fstplt
.
pimpplot
;
%% Example 1: single plot based on two data-sets
%% Tag the plot
% PlotID Implementation starts here.
% TagPlot adds a visible ID to the figure(s) and to the figures property
% 'Tag'
[
fig
,
ID
]
=
PlotID
.
TagPlot
(
fig
,
'ProjectID'
,
ProjectID
);
%% Publishing
% Second part of plotID
% The functions needs the file location, the location of the data and the
% figure and can take several options.
path
.
script
=
mfilename
(
'fullpath'
);
% filename of the m.script
% file names of the datasets
path
.
rdata
=
{
dataset1
,
dataset2
}
;
% don't forget the extension
PlotID
.
Publish
(
path
,
ID
,
fig
(
1
),
'Location'
,
'local'
,
'Method'
,
'individual'
)
\ 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