altmany / altmany/export_fig

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

Abierto
#171 4 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
MATLAB
Estrellas
1.4k
Forks
366
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.