diff --git a/+PlotID/@config/config.m b/+PlotID/@config/config.m index e5366246dc0adb85837b6038864a26f72ec6fbd8..c6d2baece14f92f9394835d1c1876b11816dd960 100644 --- a/+PlotID/@config/config.m +++ b/+PlotID/@config/config.m @@ -29,7 +29,7 @@ classdef config < handle obj.configFileName, ' found.' newline,... 'Please enter the required information manually']; disp(msg); - obj.configData = obj.wizard('initilise'); + obj.configData = obj.wizard('initialise'); m = input('Do you want to save the config, Y/N [Y]:','s'); if ismember(m,{'Y','y'}) obj.writeConfig(fullfile(pwd)); diff --git a/+PlotID/@config/wizard.m b/+PlotID/@config/wizard.m index de66181d95c25c8d3efa4d06e2e693c28f8bdfbc..47f3d8a9c080329db7db66f0467b105eebd43894 100644 --- a/+PlotID/@config/wizard.m +++ b/+PlotID/@config/wizard.m @@ -4,15 +4,15 @@ function config = wizard(mode) config = struct(); switch mode - case 'initilise' + case 'initialise' config.Author = inputRequired('your Name'); config.ProjectID = inputRequired('your Project Number'); - msg = ['Do you want to add a remote path?' newline,... + msg = ['Do you want to add an export path?' newline,... 'Otherwise your files will be stored locally.' newline,... - 'You can add this later by rerunning the initilisation.']; + 'You can add this later by rerunning the initiliasation.']; disp(msg); - m = input('Do you want add a remothe path, Y/N [Y]:','s'); + m = input('Do you want to add an export path? Y/N [Y]:','s'); if ismember(m,{'Y','y'}) config.ServerPath = uigetdir(); @@ -27,7 +27,7 @@ function usrTxt = inputRequired(msg) %Input Dialog that repeats if left empty inputRequired = true; while inputRequired - prompt = ['Please enter ', msg , ':']; + prompt = ['Please enter ', msg , ': ']; inpt = input(prompt,'s'); if isempty(inpt) disp('Input must not be empty!'); diff --git a/+PlotID/TagPlot.m b/+PlotID/TagPlot.m index b925379f4a5a8a23f5b37d802d0edc61eda0bf4f..5bc203aefea3d323f31c941968602926e08b54d1 100644 --- a/+PlotID/TagPlot.m +++ b/+PlotID/TagPlot.m @@ -16,7 +16,8 @@ arguments options.ProjectID (1,:) {mustBeText}= '' options.Fontsize (1,1) {mustBeInteger} = 8 options.Color (1,3) {mustBeNonnegative} = 0.65*[1 1 1] % grey - options.Location (1,:) {mustBeText} = 'east' + options.Location (1,:) {mustBeMember(options.Location,{'north','east',... + 'southeast','south','west','custom'})} = 'east' options.DistanceToAxis {mustBeReal} = .01 % relative distance options.Position (1,2) {mustBeVector} = [1,0.4] % default for east options.Rotation (1,1) {mustBeReal} = NaN diff --git a/Initialisation.m b/Initialisation.m index 97835f3364ac842e857a021953fa2f2c632fd38e..a30816b8aa0e8d8405695d7de19ba46713650cf2 100644 --- a/Initialisation.m +++ b/Initialisation.m @@ -1,12 +1,7 @@ %% This is the PlotID Initialisation file % Please run this script before using PlotID -%% Step 1: Add plotID location to you MATLAB path -% This is necessary to use PlotID in your personal MATLAB Scripts -addpath(pwd); -savepath; - -%% Section 2 Config File +%% Section 1 Config File % To make things easy, you should use the config file. The following wizard % will help you create one: writeConfig = true; @@ -18,7 +13,7 @@ if isfile('config.json') end if writeConfig - config = PlotID.config.wizard('initilise'); + config = PlotID.config.wizard('initialise'); fid = fopen('config.json','w'); txt = jsonencode(config,'PrettyPrint',true); fwrite(fid,txt); @@ -26,4 +21,5 @@ if writeConfig end %% +clc disp('Initialisition done.') diff --git a/example.m b/PlotID_example.m similarity index 100% rename from example.m rename to PlotID_example.m