altmany / export_fig

A MATLAB toolbox for exporting publication quality figures
BSD 3-Clause "New" or "Revised" License
1.27k stars 368 forks source link

transparent with figure units centimeters results in small image #317

Closed jlo88 closed 4 years ago

jlo88 commented 4 years ago

The following code results in a too small image:

fig = figure('Units','centimeters','position',[0,0,20,20]);
% fig.Units = 'pixels';
plot(randn(100))
export_fig('test','-png','-transparent')

test

Uncommenting the units back to pixels restores this: test

altmany commented 4 years ago

Fixed