File Exchange

image thumbnail

savefigure

version 1.2 (5.59 KB) by

Easy way of saving figures to publication friendly format.

10 Downloads

Updated

View License

  Easy way of saving figures to publication friendly format
 
  Usage: [Args=]savefigure(name[,property,value,...])
 
  properties and default value
  'Dpi',600,
  'Size',[3.3 2.5] inches
  'FontSize',0 fontsize multiplier
  'MinFontSize',8 minimum fontsize in pt
  'LineWidth',.5 linewidth multiplier
  'MinLineWidth',.5 minimum linewidth in pt
  'MarkerSize',.5 markersize multiplier
  'MinMarkerSize',3 minimum MarkerSize in pt
  'Margins',[0 0 0 0] [Left,Right,Top,Bottom] - can be used to set margins (relative units)
  . * When using automargins then this will be interpreted as additional margins
  . * when a single number is specified then it is used as a multiplier to the tight-inset used for auto margins.
  'AutoMargins',true
  'PrintOptions','' (OBSOLETE! Use Format or file-extension instead)
  'Format','png' if not specified then it will be inferred from the filename
 
-------------------
EXAMPLE:
close all;
semilogy(1:10,cos(1:10));
xlabel('x');
ylabel('y');
savefigure('test.png','s',[3.3 2.5])

Comments and Ratings (10)

Roule

Roule (view profile)

hey Aslak, really nice function.

i am able to save it to 600 dpi and all, but in the saved .tif file, the legend box is becoming excessively big with lot of extra whitespace..

apart from this legend thing, everything else works fine..but i need the legend too...

any suggestions...

Marit

Marit (view profile)

Bartek Luks

Tieyuan

Very nice tool!

Could I save figure in color using saveFigure?

Thanks
Tieyuan

Khalil

Khalil (view profile)

Xianmin

Saved lots of my time. Thanks!

Hom Gharti

Very very important.

Nickitas Georgas

Very useful to someone that wants to save a clean image quickly. I would suggest making the above usage part of the README file.

Thomas Thurnheer

Thanks a lot, you saved my day!

john moore

extreemly useful, AGU should make it known to everyone who uses Matlab for their articles

Updates

1.2

Fixes for R2014b

1.1

Added handling of legends and colorbars.

I submitted an update earlier today, but a major bug sneaked into parseArgs.m ... This has been fixed in this version.

Included a version of the routine that works in older versions of matlab.

+fixed a minor bug related to outputs.

MATLAB Release
MATLAB 7 (R14)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video