View License

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

» Watch video

Highlights from
figure2eps: version 1.3

4.0 | 2 ratings Rate this file 5 Downloads (last 30 days) File Size: 632 KB File ID: #42388 Version: 1.7
image thumbnail

figure2eps: version 1.3



27 Jun 2013 (Updated )

Combine vector graphics, e.g. text, axis etc. with bitmap graphics for surfaces in one eps file.

| Watch this File

File Information

Figure2eps - Version 1.3
June 2014

Version 1.3 - June 2014
Testing with the prereleas of MATLAB 2014b revealed a small error in the options for the painters renderer. This has been corrected so that the tool will work with the new graphics object approach in the version 2014b.

Version 1.2 - August 2013
A bug in line 178 was corrected: |for k=1:length(Ha)| corrected to |for k=1:length(Hs)|
Thanks to Juan A. Saenz for pointing out this error to me.

Version 1.1 - July 2013

The handeling of multiple axes with multiple surfaces and or patches has been improved.


This script enables the combination of vector graphics for text,
axes, line plots etc and bitmap graphics for large surfaces in one
and the same .eps file.

It automatically selects the apropriate renderer to ensure a high quality graphics while simultaneously ensuring that the graphics can later be viewed with suffieicnt speed.

Generating vector graphics from figures with large surfaces or
with a large number of patches leads to an .eps file which are
very slow to open. These files also cause problems on many
printers because it requires the printer to convert the very large
numbers of patches to a bitmap it can print.

The following logic is used when determining which renderer to

1) The painters renderer is used to render Figures without
surfaces and patches to an .eps file.

2) The painters renderer is used is a figure has patches or
surfaces if the number of patches is lower than 'maxNrPatches'
(default = 1000).

3) For large surfaces or figures with a large number of patches:

- Painters is used for all non surface an patch graphics e.g.
axes, text line plots etc.

- A bitmapRender (default = zbuffer) is used for the surfaces and

- Then the vector graphics portion and the bitmap portions are
combined in one .eps file.

4) It is also possible to force the use of the painters renderer.

I would like to thank Will Robertson for his contribution
|epscombine.m| at Matlab File Exchange:

I wish to acknowledge that without his contribution an important
part of this package would be missing. For convenience the
epscombine.m code is included in package.


Epscombine inspired this file.

MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
15 May 2015 Markus Gschwind

I have one problem:

I need to plot a combined figure with subplots where the all xticklabels use fontname symbol (p for greek pi).

Although I redefine the fontname in every line, and although it looks OK in the .fig file, figure2eps changes the fontname of the ylabel of the colorbar back to symbol (greek letters).

How could I prevent this?

10 Sep 2013 David MERCIER

28 Jun 2013 1.2

1) Corrected error in documentation
29 removed some root default setting which interfeer with opengl rendering.

31 Jul 2013 1.4

The handeling of multiple axes with multiple surfaces and or patches has been improved.

06 Aug 2013 1.6

Line 178 was corrected: k=1:length(Ha) was replaced by k=1:length(Hs). Thanks to Juan A. Saenz for pointing out this error to me.

24 Jun 2014 1.7

The options for \painters renderer have been corrected to be compatible with version 2014b

Contact us