Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: color contouring log10 of a function
Replies: 3   Last Post: Aug 16, 2008 5:17 PM

 Messages: [ Previous | Next ]
 Mike Hoversten Posts: 13 Registered: 10/27/06
Re: color contouring log10 of a function
Posted: Aug 16, 2008 3:13 PM

Walter Roberson <roberson@hushmail.com> wrote in message
<Ycppk.84086\$nD.70003@pd7urf1no>...
> G. Michael wrote:
> > I am contouring a function that I must put in log10 to
see
> > the variations. so the valuse go from 1 to 1000 say,
the
> > contour are from 0 to 3, I want the color scale to have
the
> > real values ie 1,10,100,1000, how can I do this?
>
> Color scale -- do you mean you called colorbar() ?
>
> If so, then find the axes of the colarbar plot (say Cax)

and do
>
> set(Cax, 'YTickLabel', str2num(10 .^ get(Cax, 'YTick'));
>
> --
> Q = quotation(rand);
> if isempty(Q); error('Quotation server filesystem

problems')
> else sprintf('%s',Q), end

thanks that gets close but not quite. My code is:
clabel(Cf,h)
colormap(hsv(256))
ah = colorbar('vert')
title('Rock Resisitivty from Hibernia B16_17');
xlabel('Porosity','fontname','bookman','fontsize',11)
ylabel('Water Saturation S
_w','fontname','bookman','fontsize',11)
hold off;
grid on;

set(ah, 'YTickLabel', num2str(10 .^ get(ah, 'YTick')));

The color bar label are all 10 31.62

It look like it is trying to put all o fthe labels (7 in
all) on each tick mark?

Date Subject Author
8/15/08 Mike Hoversten
8/15/08 Walter Roberson
8/16/08 Mike Hoversten
8/16/08 Derek Goring