From: Jeremy on
Hello! Two questions for everyone to consider...

(1) I'm working on a gui with an image being shown next to a plot. The user selects regions of an image using roipolyold, and with each new region, a line is added to the plot next door. I've got the color of each additional line on the plot changing with no problems, but I'm trying to match these colors with a label that is drawn on top of the image. Seems trivial, right? I've pulled the ColorOrder matrix, and have a variable which keeps track of the number of regions selected. When I draw the label, I tell it to use: 'Color',colororder(numplots,:). Not working...each of the labels shows up blue! Any thoughts?

(2) I have an option to switch the view to 3d under certain circumstances. The 3d plot looks best with a jet colormap. However, when I set this colormap for axes2, the colormap for axes1 (the image) is also changed, and I can't figure out why. Any thoughts?

Thanks!
Jeremy
From: Jeremy on
Please help!

I've gotten #1 of my original post figured out, but #2 is still driving me insane!

Can anyone help me?

Thanks!
From: Walter Roberson on
Jeremy wrote:

> (2) I have an option to switch the view to 3d under certain
> circumstances. The 3d plot looks best with a jet colormap. However, when
> I set this colormap for axes2, the colormap for axes1 (the image) is
> also changed, and I can't figure out why. Any thoughts?

colormaps are per-figure, not per-axes

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/colormap.html

Algorithm

Each figure has its own colormap property. colormap is a function that
sets and gets this property.
From: Jeremy on
Thanks for the info Walter. After a quick search with your info in mind, I came across this link...just in case anyone else has a desire to do utilize multiple colormaps within a single figure.

http://www.mathworks.com/support/tech-notes/1200/1215.shtml
 | 
Pages: 1
Prev: image processing
Next: Slow graphics refresh