Rank: 504011 based on 0 downloads (last 30 days) and 0 file submitted
photo

James

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by James
Updated File Comments Rating
12 Sep 2013 export_fig Exports figures nicely to a number of vector & bitmap formats. Author: Oliver Woodford

I just started using this. I mostly only use HG2.
I get the following error when I try to run your example code for creating a .pdf, with HG2.

A = im2double(imread('peppers.png'));
B = randn(ceil(size(A, 1)/6), ceil(size(A, 2)/6), 3) * 0.1;
B = cat(3, kron(B(:,:,1), ones(6)), kron(B(:,:,2), ones(6)), kron(B(:,:,3), ones(6)));
B = A + B(1:size(A, 1),1:size(A, 2),:);
imshow(B)
>> export_fig test.pdf
Error using eps2pdf (line 107)
Error: /undefined in bdef
Operand stack:
dom --nostringval--
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push
--nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1932 1 3
%oparray_pop 1931 1 3 %oparray_pop 1915 1 3 %oparray_pop 1803 1 3 %oparray_pop
--nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2
%stopped_push --nostringval--
Dictionary stack:
--dict:1190/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
Current file position is 64
GPL Ghostscript 9.10: Unrecoverable error, exit code 1

Error in export_fig (line 431)
eps2pdf(tmp_nam, pdf_nam, 1, options.append, options.colourspace==2, options.quality);

I do not get this error when I am not using HG2, but it would take awhile for me to convert everything back from HG2. Do you have any ideas how to fix the problem?

(Note, laprint also doesn't seem to work with HG2. So, this could be a problem with HG2 and not have anything to do with your files.)

Contact us