Skip to content
Snippets Groups Projects
Commit 7294d7ef authored by M. Hock's avatar M. Hock
Browse files

Changed and added some comments.

parent d5d196c8
No related branches found
No related tags found
3 merge requests!13PreRelease_V0.1,!12PreRelease_V0.1,!2Fixed an error related to index table instead of structure. (publish/fileCompare)
% 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);
%% publishing
%% Publishing
% 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 dataset
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment