Multiple colormaps in contourf plots exported as eps
FCT_EPS_EXCHANGE_AXIS is a workaround solution for the problem Matlab has
using multiple colormaps in one figure.
This function is a quick and dirty solution. It works without using the
packages 'freezeColor' or 'cbfreeze'. However, I do not know whether it
works with every GhostScript version.
I call it a dirty solution, because the actual problem Matlab exhibits is
not solved. Instead the resulting figure is obtained from two exported
eps-files of the same figure with different colormaps.
The way it works: From two eps files created from the same figure
using different colormaps this function reads from both the desired axes and puts it altogether to one eps-file 'out.eps'.
If the figure should have more than two different colormaps the 'out.eps'
can be again used with a third eps-file of the figure using another
colormap, and so on.
Cite As
Christian Brandt (2026). Multiple colormaps in contourf plots exported as eps (https://www.mathworks.com/matlabcentral/fileexchange/36899-multiple-colormaps-in-contourf-plots-exported-as-eps), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
