I am using matlab 2010. I want to draw a colorbar on contourf plot but the contourf colors and colorbar colors are not matching
The example code looks like this
clear; clc;close all;
X=1:10;Y=1:10;
C=rand(10,10)*100;
colormap(jet(7));
[c1 h1]=contourf(X,Y,C,fliplr([0 10 20 50 60 70 100]));
clabel(c1,h1);
colorbar
I want to say if the values 20-50 fall in one category then why 20-30 30-40 is displayed on the colorbar
please help in this problem
|
|
0
|
|
|
|
Reply
|
Makarand
|
5/19/2010 10:45:23 AM |
|
I think no body could understand my problem
I shall make it more brief please answer it.
I modify the code like this
clear; clc;close all;
X=1:10;Y=1:10;
C=rand(10,10)*100;
colormap(jet(7));
[c1 h1]=contourf(X,Y,C,fliplr([0 10 20 50 60 70]));
clabel(c1,h1);
hold on
pcolor(X,Y,C);
colorbar
See the Pcolr values are not matching with the matrix C why is so?
any help please
|
|
0
|
|
|
|
Reply
|
Makarand
|
5/19/2010 11:39:05 AM
|
|
"Makarand " <makarand_kulkarni@hotmail.com> wrote in message <ht0fg3$li7$1@fred.mathworks.com>...
> I am using matlab 2010. I want to draw a colorbar on contourf plot but the contourf colors and colorbar colors are not matching
> The example code looks like this
> clear; clc;close all;
> X=1:10;Y=1:10;
> C=rand(10,10)*100;
> colormap(jet(7));
> [c1 h1]=contourf(X,Y,C,fliplr([0 10 20 50 60 70 100]));
> clabel(c1,h1);
> colorbar
>
> I want to say if the values 20-50 fall in one category then why 20-30 30-40 is displayed on the colorbar
> please help in this problem
Kindly check little modified code
clear; clc;close all;
X=1:10;Y=1:10;
C=rand(10,10)*100;
colormap(jet(7));
[c1 h1]=contourf(X,Y,C,fliplr([0 10 20 50 60 70]));
clabel(c1,h1);
hold on
pcolor(X,Y,C);
colorbar
see the values in the matrix C doesn't agree with the color scale what to do for that
please help me
|
|
0
|
|
|
|
Reply
|
Makarand
|
5/19/2010 11:44:04 AM
|
|
"Makarand " <makarand_kulkarni@hotmail.com> wrote in message <ht0fg3$li7$1@fred.mathworks.com>...
> I am using matlab 2010. I want to draw a colorbar on contourf plot but the contourf colors and colorbar colors are not matching
> The example code looks like this
> clear; clc;close all;
> X=1:10;Y=1:10;
> C=rand(10,10)*100;
> colormap(jet(7));
> [c1 h1]=contourf(X,Y,C,fliplr([0 10 20 50 60 70 100]));
> clabel(c1,h1);
> colorbar
>
> I want to say if the values 20-50 fall in one category then why 20-30 30-40 is displayed on the colorbar
> please help in this problem
I do not understand your problem but
It seems your problem is colorbar.
why not you set the colorbar.
|
|
0
|
|
|
|
Reply
|
mat001
|
5/19/2010 2:09:06 PM
|
|
"mat001 " <priya.biomath@yahoo.co.in> wrote in message <ht0re2$pon$1@fred.mathworks.com>...
> "Makarand " <makarand_kulkarni@hotmail.com> wrote in message <ht0fg3$li7$1@fred.mathworks.com>...
> > I am using matlab 2010. I want to draw a colorbar on contourf plot but the contourf colors and colorbar colors are not matching
> > The example code looks like this
> > clear; clc;close all;
> > X=1:10;Y=1:10;
> > C=rand(10,10)*100;
> > colormap(jet(7));
> > [c1 h1]=contourf(X,Y,C,fliplr([0 10 20 50 60 70 100]));
> > clabel(c1,h1);
> > colorbar
> >
> > I want to say if the values 20-50 fall in one category then why 20-30 30-40 is displayed on the colorbar
> > please help in this problem
>
> I do not understand your problem but
> It seems your problem is colorbar.
>
> why not you set the colorbar.
hi ,
Thanks for the reply
Will you please tell me how to do that?
Because you see we have 7 categories of contour and 7 colors, but some colors remain unused. and some have been used twice. so how to handle this problem.
thanks again
|
|
0
|
|
|
|
Reply
|
Makarand
|
5/20/2010 3:04:05 AM
|
|
|
4 Replies
280 Views
(page loaded in 0.055 seconds)
Similiar Articles: colorbar properties for scatter plot - comp.soft-sys.matlab ...Bar plot color/shading issues - comp.soft-sys.matlab colorbar properties for scatter plot - comp.soft-sys.matlab ..... Data'}) This still does not solve the problem ... pcolor in Matlab - comp.soft-sys.matlabLog scaling of colors/colorbar for pcolor plot - comp.soft-sys ... I'm doing a pcolor ... dimensional reaction diffusion equation ... I have had a go at coding the problem in ... Change colormap font size then export to png - comp.soft-sys ...When I change the colorbar font size by either commanding set(colorbar,'fontsize',14 ... How can I get around this? > > Thanks in advance. > > Joe I had the same problem ... comp.soft-sys.matlab - page 230I have a little problem with Matlab. I would like do several 3D graphics (with 'surf' command). And the colorbar have to be the same for all. I define the colormap (in ... comp.lang.idl-pvwave - page 23Then, I insert a colorbar but the displayed values on the colorbar are all "NAN". ... fault read_tiff #2 0 4 (12/2/2003 3:03:42 PM) Hello I have a strange a problem with my ... Setting color scale in mesh plots - comp.soft-sys.matlab ...Hello, I am trying to solve a boundary-value problem - a system ... Setting color ... MATLAB and ... colorbar -Colorbar showing color scale Alternatives. Add a colorbar to ... Bar plot color/shading issues - comp.soft-sys.matlabcolorbar properties for scatter plot - comp.soft-sys.matlab ... Bar plot color/shading ... Hi Salkim, The problem with the code is that you did not tell grads in your second ... "a parameter is out of range" - comp.graphics.apps.paint-shop-pro ...It found some problems that it fixed, some others that it could not fix (although ... set colorbar range - comp.soft-sys.matlab "a parameter is out of range" - comp ... Using multiple colormaps in the same figure (different subplots ...Problem with Multiple Axes (Plots) on one Figure - comp.soft-sys ..... abxes) on ... Log scaling of colors/colorbar for pcolor plot - comp.soft-sys ..... whatever, then ... FTGL font engine - comp.graphics.api.openglI don't think, that this is an OpenGL problem. Probably you just got a problem with the ordering of the DIBSECTION. A quick test is to render a colorbar to see in which ... Problem with colorbar - Newsreader - MATLAB CentralFile exchange, MATLAB Answers, newsgroup access, Links, and Blogs for the MATLAB & Simulink user community Matlab: Problem with colorbar after save ... - programming.itags.orgprogramming.itags.org: Matlab question: Problem with colorbar after save ..., created at:Sun, 18 May 2008 19:56:00 GMT with 535 bytes, last updated: Sunday, July 22 ... 7/24/2012 7:04:36 PM
|