|
|
how to set the range of colorbar
hello guys,
i have a matrix:
-------------------------------------------------
a= 2.3 1.7 3.3
4.1 4.4 9.7
1.4 5.7 8.1
-------------------------------------------------
and i have used "pcolor" to draw this figure as:
------------------------------------------------
h=pcolor(a);
set(h,'LineStyle','none');
axis image
colorbar
-------------------------------------------------
the range colorbar will be set automatically in this case (from 1 to 10).
question is: is it possible that i can set or define this range like from 1 to 20 in this case.
thanks,
james
|
|
0
|
|
|
|
Reply
|
James
|
10/8/2010 8:28:05 AM |
|
"James Waage" <again@hotmail.de> wrote in message <i8mkml$age$1@fred.mathworks.com>...
> hello guys,
>
> i have a matrix:
> -------------------------------------------------
> a= 2.3 1.7 3.3
> 4.1 4.4 9.7
> 1.4 5.7 8.1
> -------------------------------------------------
> and i have used "pcolor" to draw this figure as:
> ------------------------------------------------
> h=pcolor(a);
> set(h,'LineStyle','none');
> axis image
> colorbar
> -------------------------------------------------
> the range colorbar will be set automatically in this case (from 1 to 10).
> question is: is it possible that i can set or define this range like from 1 to 20 in this case.
>
> thanks,
> james
Hi James,
Set the CLIM on the axes.
e.g.
a= [2.3 1.7 3.3;
4.1 4.4 9.7;
1.4 5.7 8.1];
h=pcolor(a);
set(h,'LineStyle','none');
axis image
colorbar
% the color limits are a property of the axes
axHdl = get(h,'Parent'); %get the axes parent of the surface
%you will see the CLIm is set to the range of your data
cLim = get(axHdl,'CLim') %you will see the CLIm is set to the range of your data
%now set the CLIM to the range we want
set(axHdl,'CLim',[1,20])
Hope this helps
Matt W
|
|
0
|
|
|
|
Reply
|
Matthew
|
10/8/2010 4:23:04 PM
|
|
|
1 Replies
526 Views
(page loaded in 0.04 seconds)
Similiar Articles: how to set the range of colorbar - comp.soft-sys.matlabhello guys, i have a matrix: ----- a= 2.3 1.7 3.3 4.1 4.4 9.7 1.4 5.7 8.1 -----... ... hello guys, i ... set colorbar range - comp.soft-sys.matlabI have generated a checker plot using imagesc to graphically display cross-correlation values. I also manually set the lowest color to white by applyi... Log scaling of colors/colorbar for pcolor plot - comp.soft-sys ...how to set the range of colorbar - comp.soft-sys.matlab... apps.gnuplot... way that will help understanding the solution: You're setting the zrange (that is, the range the ... Adjust colorbar scale on quiver plots - comp.soft-sys.matlab ...set colorbar range - comp.soft-sys.matlab make quiver not show 0 - comp.soft-sys.matlab set colorbar range - comp ... and imagesc plots - comp ... how to set the range of ... colorbar properties for scatter plot - comp.soft-sys.matlab ...how to set the range of colorbar - comp.soft-sys.matlab colorbar properties for scatter plot - comp.soft-sys.matlab ... set colorbar range - comp.soft-sys.matlab colorbar ... Setting color scale in mesh plots - comp.soft-sys.matlab ...how to set the range of colorbar - comp.soft-sys.matlab Setting z scale in mesh plots - comp.soft-sys.matlab Hello all, I am ... MATLAB and ... colorbar -Colorbar showing ... Plot 2D - with third argument (colorbar) - comp.soft-sys.matlab ...how to set the range of colorbar - comp.soft-sys.matlab Log scaling of colors/colorbar for pcolor plot - comp.soft-sys ... set colorbar range - comp.soft-sys.matlab Log ... Setting z scale in mesh plots - comp.soft-sys.matlabquiver in Matlab - comp.soft-sys.matlab Setting z scale in mesh plots - comp.soft-sys.matlab set colorbar range - comp.soft-sys.matlab quiver in Matlab - comp.soft-sys ... Customize tick marks value in the colorbar - comp.soft-sys.matlab ...set colorbar range - comp.soft-sys.matlab... imagesc to graphically display cross-correlation values. ... set the lowest color to white by applying a custom ... Setting axis limits on a compass plot - comp.soft-sys.matlab ...how to set the range of colorbar - comp.soft-sys.matlab... LineStyle','none'); axis image colorbar % the color limits ... setting limits for colorbar ranges ... like to ... how to set the range of colorbar - comp.soft-sys.matlab | Computer ...hello guys, i have a matrix: ----- a= 2.3 1.7 3.3 4.1 4.4 9.7 1.4 5.7 8.1 -----... ... hello guys, i ... how to set the range of colorbar - Newsreader - MATLAB CentralFile exchange, MATLAB Answers, newsgroup access, Links, and Blogs for the MATLAB & Simulink user community 7/23/2012 12:44:54 AM
|
|
|
|
|
|
|
|
|