altmany / altmany/export_fig

How to Stabilise export_fig output studied by size(I)?

Offen
#171 4 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
MATLAB
Sterne
1.4k
Forks
366
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Code snapshot where `assert` is not passed because `size(I)` fluctuates; please see the line of `export_fig` where its parameters may cause the fluctuation; you can use any data in `time`, `potential` and `C` as test data; the observation is that with the same test data, you get those fluctuations in `size(I)` which should not be possible

``` Matlab
hFig=figure('Units', 'inches', 'Position', [0 0 15 15]);
hax=axes(hFig);
imagesc(hax, time, potential, C);
xlim(hax, [1 2]);
ylim(hax, [0 180]);
axis(hax, [1 2 0 180]);

[I, alpha] = export_fig(filename, '-tif', '-q101', '-a1', '-m1', '-RGB', \
... '-nofontswap', '-nocrop', '-transparent', hax);
assert(unique(size(I)== [960 960*index]), \
.... 'dimensions %d x % d not corresponding to resolution', size(I));
%Fluctuations in size(I)
% 928 968
% 928 960
% 960 960 - correct
% 928 952
```

I have already verified the data in hax, and tried to set all possible limits which may cause the fluctuations in `size(I)`. I think it may be because of some parameters of `export_fig`.

OS: Debian 8.5 64 bit
Linux kernel: 4.6 of backports
Export-fig: 25-sep 2016 version
Hardware: Asus Zenbook UX303UA
Matlab: 2016a

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.