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



Personal Profile:


Watch this Author's files


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

After upgrading to 2013a, I get an error when using export_fig to save a .png with a transparent background. It works fine in 2012a. Perhaps Matlab changed something about writepng in 2013a? Has anyone found a work around for this? Is there an updated version of export_fig that can save a .png with a transparent background in 2013a?

export_fig CouplingEfficiency.png -transparent -native
Error using writepng (line 78)
Argument 'alpha' failed validation with error:
Expected input to be one of these types:

double, uint8, uint16

Instead its type was single.

Error in imwrite (line 473)
feval(fmt_s.write, data, map, filename, paramPairs{:});

Error in export_fig (line 281)
imwrite(A, [options.name '.png'], 'Alpha', alpha, 'ResolutionUnit', 'meter', 'XResolution',
res, 'YResolution', res);

Contact us