view axPos.m @ 841:006defd0247b

Fix bug in +scheme.bcSetup outputs of parseDate(...) were not set correctly which caused a chrash in the case when no data was provided for the BC
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 20 Sep 2018 11:45:40 +0200
parents 8979d81515ac
children
line wrap: on
line source

function axPos(n,m)
    a = {};
    aPos = [];
    for i = 1:n*m
        a{i} = subplot(n, m, i);
        aPos(i,:) = a{i}.Position;
    end

    dx = aPos(1,3);
    dy = aPos(1,4);

    x = unique(aPos(:,1));
    y = unique(aPos(:,2));


    fprintf('dx: %f\n', dx);
    fprintf('dy: %f\n', dy);

    fprintf(' x: ');
    fprintf('%f ', x);
    fprintf('\n');

    fprintf(' y: ');
    fprintf('%f ', y);
    fprintf('\n');
end