From: Mathew on 1 Dec 2009 22:27 "Mathew " <Kalaeimh(a)yahoo.com> wrote in message <hf46iv$3e3$1(a)fred.mathworks.com>... > I am generating a distribution graph using "pcolor". here are my questions: > > 1- How can I set the "color data min" and "color data max" to be constant value in M file? In each run that I generate the graph, it changes based on the data. I don't want this happen. > > 2- I want to assign a color to each number between min and max. > For example: > min=10--->blue > max=1000--->red > any number between, use RGB interpolation based on the above criteria for color and number. how can I do that in M file so each time I don't need to go to the colormap Editor and change them? > > 3- In the "Edit Axes Ticks", I want to use different labels (but in number not text). How can I set this in M file? Is there anybody that can answer the above post?
From: ImageAnalyst on 1 Dec 2009 22:53 Not sure what to say about 1 and 2. Did you read the help on colormap () and still don't understand it?
From: Mathew on 1 Dec 2009 23:25 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.
From: Mathew on 1 Dec 2009 23:45 "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? > 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?
From: ashu mamgain on 18 Dec 2009 08:25 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
|
Pages: 1 Prev: Error passing initial condition vector to ODE solver Next: inputParser & validateattributes |