altmany / altmany/export_fig

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

Ouverte
#171 4 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
MATLAB
Étoiles
1.4k
Forks
366
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.