From: Juan Dominguez on 7 May 2010 12:29 "Mathew " <Kalaeimh(a)yahoo.com> wrote in message <hf4q7i$1fk$1(a)fred.mathworks.com>... > ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <4abd6b23-8dfe-456d-8d8e-9b2d9456905f(a)e23g2000yqd.googlegroups.com>... > > Not sure what to say about 1 and 2. Did you read the help on colormap > > () and still don't understand it? > > OK. assume that my output matrix , lets say A, has numbers between 10 to 1000. I draw A with pcolor. > So, in the RBG mode, I will have 10 as red and 1000 as blue. > > Now, in the next run, A has some numbers between 300 to 800. Now, in the RBG mode, 300 is set as red and 800 as blue; which I don't want it. I want to have a constant scale as: 10 to be red and 1000 to be blue, for all my runs; no matter what the range of A is. > > I guess, in each time, matlab looks at the highest value and lowest value of A and set them as red and blue; as I said I don't want it. I want to assign the min and max to particular colors. I have the exact same question. Doing what Mathew says is the only way to visualy compare 2 pcolor plots. Was your question answered Mathew?
From: Juan Dominguez on 7 May 2010 12:35 ashu mamgain <ashumam(a)gmail.com> wrote in message <6a62063b-a6b4-445b-ad0d-0b1a7271cade(a)d9g2000prh.googlegroups.com>... > On Dec 2, 9:45 am, "Mathew " <Kalae...(a)yahoo.com> wrote: > > "Mathew " <Kalae...(a)yahoo.com> wrote in message <hf4q7i$1f...(a)fred.mathworks.com>... > > > ImageAnalyst <imageanal...(a)mailinator.com> wrote in message <4abd6b23-8dfe-456d-8d8e-9b2d94569...(a)e23g2000yqd.googlegroups.com>... > > > > Not sure what to say about 1 and 2. Did you read the help on colormap > > > > () and still don't understand it? > > > > It was not helpful. > > OK. assume that my output matrix , lets say A, has numbers between 10 to 1000. I draw A with pcolor. > > So, in the RBG mode, I will have 10 as red and 1000 as blue. > > > > Now, in the next run, A has some numbers between 300 to 800. Now, in the RBG mode, 300 is set as red and 800 as blue; which I don't want it. I want to have a constant scale as: 10 to be red and 1000 to be blue, for all my runs; no matter what the range of A is. > > > > I guess, in each time, matlab looks at the highest value and lowest value of A and set them as red and blue; as I said I don't want it. I want to assign the min and max to particular colors. > > > > Lets say it in another word: How can I assign values to "color data min" and "color data max" of "Colormap Editor Window" in an M file? > > I think you can try this: enter > > caxis([minvalue maxvalue]) > colorbar That works thanks! I had the exact same question. Doing this is the only way to visualy compare 2 pcolor plots.
|
Pages: 1 Prev: how do I use "SelectedObject" property? Next: Matrix rotation function |