Multiple colormaps in contourf plots exported as eps

Two eps files of the same figure with different colormaps are merged to one.
229 Downloads
Updated 29 May 2012

View License

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 (2024). 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
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Colormaps in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0