About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

scripts default iconfreezeColors / unfreezeColors (Scripts) Publisher's description

There is only one colormap per figure, so all plots share the same colormap

Version , 3/2007
(*What's NEW: 9/2010, A colorbar solution)

Problem: There is only one colormap per figure, so all plots share the same colormap. Often one wants different colormaps.

Solution: This function pair provides an easy way to have plots using different colomaps in the same figure.

colormap hot
freezeColors %freeze this plot's colormap

colormap hsv % won't change any frozen plots!

**** COLORBAR WORKAROUND (NEW 9/2010) ****
** Note: in recent versions of MATLAB the colorbar is reinitialized
** whenever you call COLORMAP, which undoes the effects of freezeColors.
** Suggested solution: Use the function CBFREEZE, by
** Carlos Adrian Vargas Aguilera, located in the fileexchange
** http://www.mathworks.com/matlabcentral/fileexchange/24371

h=colorbar; cbfreeze(h), or simply cbfreeze(colorbar)

%Colorbar workaround example

Since Carlos has made a nice solution, I have chosen not to duplicate his efforts. Please use his fine code.


freezeColors Freeze colors of plots, making them immune to later changes in the colormap. Converts colors of many graphics objects (images, surfaces, scattergroups, bar plots, patches, etc--anything using indexed CData) to [r g b] truecolor.

unfreezeColors Reverses the effects of freezeColors. Restores the original indexed color data, allowing the colormap and caxis to again affect the plots.

Demo & Documentation in freezeColors_pub.html, test in test/test_main.m.

System Requirements:

MATLAB 7.10 (2010a)
Program Release Status: New Release
Program Install Support: Install and Uninstall

freezeColors / unfreezeColors (Scripts) Tags:

Click on a tag to find related softwares

Is freezeColors / unfreezeColors (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.