altmany / altmany/export_fig

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

Đang mở
#171 4 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
MATLAB
Star
1.4k
Fork
366
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.