altmany / altmany/export_fig

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

Aberta
#171 4 comentários 1 reação 0 responsáveis Ver no GitHub
Linguagem predominante
MATLAB
Estrelas
1.4k
Forks
366
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.