Skip to content
Snippets Groups Projects
Commit d304128d authored by Lemmer, Jan's avatar Lemmer, Jan
Browse files

Merge branch '45-feature-distance-to-axis' into 'development'

Implements #45

See merge request !28
parents e7c4ae99 b9fc0f62
No related branches found
No related tags found
2 merge requests!30Fix CI,!28Implements #45
Pipeline #586839 passed
......@@ -17,6 +17,7 @@ arguments
options.Fontsize (1,1) {mustBeInteger} = 8
options.Color (1,3) {mustBeNonnegative} = 0.65*[1 1 1] % grey
options.Location (1,:) {mustBeText} = 'east'
options.DistanceToAxis {mustBeReal} = .01 % relative distance
options.Position (1,2) {mustBeVector} = [1,0.4] % default for east
options.Rotation (1,1) {mustBeReal} = NaN
end
......@@ -41,19 +42,24 @@ end
switch options.Location
case 'north'
options.Position = [0.4,0.95];
y = 1 - options.DistanceToAxis
options.Position = [0.4,y];
Rotation = 0;
case 'east'
options.Position = [1,0.4];
x = 1 - options.DistanceToAxis;
options.Position = [x,0.4];
Rotation = 90;
case 'south'
options.Position = [0.4,.02];
y = 0 + options.DistanceToAxis;
options.Position = [0.4,y];
Rotation = 0;
case 'west'
options.Position = [.05,0.4];
x = 0 + options.DistanceToAxis;
options.Position = [x,0.4];
Rotation = 90;
case 'southeast'
options.Position = [0.8,.02];
y = 0 + options.DistanceToAxis;
options.Position = [0.8, y];
Rotation = 0;
case 'custom'
% Check if Position is valid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment