graphical object changing color!!

5 views (last 30 days)
hana
hana on 17 Jan 2012
Guys, My code draws an object on top of another graphical object. The first object is plotted by {surf} of an {spline} and is multicolored.. (it's a Protein helix). My second graphical object (objects) is a group of cones drawn in a for-loop one by one by {surf} of {cylinder}.They are cones mimicking the intensity and direction of the forces on some of the atoms. The problem is that as soon as the cones are drawn the ribbon looses it's original color and everything turns neon blue even the cones!! Does anyone have any idea why this happens. P.S. I can provide you with screen shots.

Accepted Answer

Walter Roberson
Walter Roberson on 17 Jan 2012
There is only one colormap per figure. If you have a colormap() call after the second plot, the first plot will change color.
  1 Comment
hana
hana on 20 Jan 2012
Thank you so much. It resolved the issue :)

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!