How to kill a colormap in a figure?

8 次查看(过去 30 天)
hana
hana 2012-6-1
I have a gui with a single axes. At different stages, different objects are drawn. The first object being drawn is a surf with colormap 1 and at a different instance, I'm hiding this first object : hidem (handles.obj1); to show a second set of objects (a set of surf objects) with their own colormap 2. My problem is when I'm getting rid of the 2nd object (by delete) and it's time to show the primary object, it's original colormap is disappearing!!
I have tried using "freezeColors", but it seems no matter what, one of the colormaps gets transferred to the other object. I guess it's because the first object never really disappears and it's always inside the axes, it's just not visible when I'm assigning a new colormap to the 2nd object. The clue is that I am showing these objects "not" simultaneously and I just want to go back to the first object with it's original colormap. I even tried specifying the original colormap1 when I showed my first object again, but no luck yet!
Any help is appreciated

回答(1 个)

Image Analyst
Image Analyst 2012-6-1
When you get rid of your second surf drawing, and display your first surf drawing again, you'll need to tell it to use your first surf colormap again.
Otherwise you might experiment around with the "cla" or "cla reset" command to get back to square one.

类别

Help CenterFile Exchange 中查找有关 Colormaps 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by