Allow setting of resolution for vector formats (thanks to Jan Jaap Meijer for suggesting this). Fix bug in isolate_axes (thanks to Will Grant for this).
Access user strings in text, not binary mode, to avoid errors. Now swap fonts in axes labels when exporting in vector format. Thanks to Christian and Rasmus Ischebeck for pointing out these respective errors.
Bug fix to font swapping in vector formats, fixed paper orientation bug and removed conflict with the path function. Many thanks to Malcolm Hudson, Michael Watts and Michel Slivitzky for reporting those issues respectively.
Add ability to add bookmarks based on figure names into PDFs - thanks to Petr Nechaev for this. Keep tick marks fixed - thanks to Arcelia Arrieta for this.
Various bug fixes - thanks to Phil Trinh, Mathieu Morlighem and Meelis Lootus for reporting the issues. Also added new -transparent option, and set default anti-aliasing down to -a3.
Fix bitmap cropping with painters renderer. Make bitmap outputs exactly the right size. Suppress warnings by setting EraseModes to normal when using opengl or zbuffer renderers (thanks to Pawel Kocieniewski for reporting the issue).
Find 64-bit Ghostscript on Windows (thanks to Paul Durack and Shaun Kline for both reporting this issue). Fix bug in isolate_axes (thanks to Rosella Blatt for reproting this).
Enable exporting of multiple axes (when a subset of all axes). Don't save user specific paths in .m files that may be version controlled (thanks to Jonas Dorn for the suggestion). Minor bug fixes.
Faster bitmap export using hardcopy. Better error checking for when exporting to non-existent directories (thanks to Aldebaro Klautau for reporting this).
Isolate axes better in presence of gui objects (thanks to Tammy Threadgill for reporting the issue). Maintain resolution of very small images in vector formats when using lossless compression (thanks to Scott for reporting the issue).
Fixed bug which caused bitmaps to be poorly rendered when using the painters renderer on figures with many patches in. Also added fix to bug reported by Andrew Matthews (thanks!) affecting export in -nodisplay mode.
Fix to bug which caused an error when exporting to transparent bitmap with no colorbar present (introduced 8th April 2010). Thanks to Gracee for reporting it.
Fix to colorbar axes color bug with transparent bitmap export (thanks to Roland Martin for reporting it). Look for ghostcript in default location on 64 bit Windows (thanks to suggestion by Nathan Childress).
Added ability to vary quality/compression level for jpg, pdf & eps output. Thank you to Fabio Viola for pointing out compression artifacts using the default settings.
Added -native option for exporting to bitmap at native resolution of an image. Fixed uigetdir title problem on MAC OS X (thanks to Jonas for the bug report).
Improved rendering of dashed and dotted lines for bitmap outputs using the -painters algorithm. This overcomes the "shrinking dash" problem mentioned by Yvonne Haesevoets (thanks!).
Bug fix (thanks, Andreas Offenhaeuser). Added grayscale option (suggestion thanks to Bob Sica). Added correct resolution for tiff & png (sugestion thanks to Yvonne Haesevoets).
Added option to use zbuffer renderer for bitmaps. This avoids some errors caused by bugs in the opengl renderer.
Fixed bug when exporting greyscale figures with an alphamatte (thanks to Annette for pointing it out).
Added options to disable cropping and set level of anti-aliasing. Added a fix to get round a rendering bug in print (thanks to Johannes Korsawe for pointing it out).
Incorporated Christian Dorion's patch for updating ghostscript (and also pdftops) path. Fixed bug that didn't correctly detect if pdftops path was valid (due to a MATLAB/Windows bug).
This function saves a figure or single axes to one or more vector and/or bitmap file formats, and/or outputs a rasterized version to the workspace, with the following features:
Figure/axes reproduced as it appears on screen
Cropped/padded borders (optional)
Embedded fonts (vector formats)
Improved line and grid line styles
Anti-aliased graphics (bitmap formats)
Render images at native resolution (optional for bitmap formats)
This function is especially suited to exporting figures for use in publications and presentations, because of the high quality and portability of media produced.
Background color and figure dimensions are reproduced (the latter approximately, and ignoring cropping & magnification) in the output file. For transparent background (and semi-transparent patch objects), use the -transparent option, and set the axes 'Color' property to 'none' where desired. Only some image formats support a transparent background, and only png/tiff support transparency of patch objects.
When exporting to vector format (pdf & eps), and to bitmap using the painters renderer, ghostscript (http://ghostscript.com) needs to be installed on your system
When exporting to eps, the pdftops program, a part of the Xpdf package, also needs to be installed. You can download this from http://xpdfreader.com
This submission was originally created by Oliver Woodford. Yair Altman maintains this utility since Jan 2015.
A single textual ad message is displayed once a week. I have no intention of removing the ad; if you don't want to see even a single ad once a week, don't use the program.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country
sites are not optimized for visits from your location.