From: Mr.Capsicum on
I have a matrix representing "a bump" and I want to visualize it as it
was rising from a wall. Now I'm greating X and Y with meshgrid and
plotting it with
surf(X, D, Y);
colormap(jet);
axis equal;
view(130, 30);

Problem is that the colormap runs in z-axis direction when I would
like it to run along values in D. If I change the surf to surf(X,Y,D)
the colormap is what I want to, but it is impossible to rotate the
image such that the values from D would be somehow horizontally. Looks
it locks the z-axis or something, thus no view-command would make the
trick.

After poking around with the help files I Couldn't figure out how to
do this. Any suggestions?
From: Steven Lord on

"Mr.Capsicum" <mr.capsicum(a)gmail.com> wrote in message
news:004abc1e-d511-4c4e-89fb-e8dd4cc19661(a)i10g2000yqh.googlegroups.com...
>I have a matrix representing "a bump" and I want to visualize it as it
> was rising from a wall. Now I'm greating X and Y with meshgrid and
> plotting it with
> surf(X, D, Y);
> colormap(jet);
> axis equal;
> view(130, 30);
>
> Problem is that the colormap runs in z-axis direction when I would
> like it to run along values in D. If I change the surf to surf(X,Y,D)
> the colormap is what I want to, but it is impossible to rotate the
> image such that the values from D would be somehow horizontally. Looks
> it locks the z-axis or something, thus no view-command would make the
> trick.
>
> After poking around with the help files I Couldn't figure out how to
> do this. Any suggestions?

Look at the syntax for SURF that accepts 4 input arguments -- x, y, z, and
c.

[x, y, z] = peaks;
subplot(2, 2, 1); surf(x, y, z, x);
subplot(2, 2, 2); surf(x, y, z, y);
subplot(2, 2, 3); surf(x, y, z, z);

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: someone on
"Mr.Capsicum" <mr.capsicum(a)gmail.com> wrote in message <004abc1e-d511-4c4e-89fb-e8dd4cc19661(a)i10g2000yqh.googlegroups.com>...
> I have a matrix representing "a bump" and I want to visualize it as it
> was rising from a wall. Now I'm greating X and Y with meshgrid and
> plotting it with
> surf(X, D, Y);
> colormap(jet);
> axis equal;
> view(130, 30);
>
> Problem is that the colormap runs in z-axis direction when I would
> like it to run along values in D. If I change the surf to surf(X,Y,D)
> the colormap is what I want to, but it is impossible to rotate the
> image such that the values from D would be somehow horizontally. Looks
> it locks the z-axis or something, thus no view-command would make the
> trick.
>
> After poking around with the help files I Couldn't figure out how to
> do this. Any suggestions?

doc colorbar

look at the 'location' property
From: Mr.Capsicum on
On May 11, 5:17 pm, "Steven Lord" <sl...(a)mathworks.com> wrote:
> Look at the syntax for SURF that accepts 4 input arguments -- x, y, z, and
> c.
>
> [x, y, z] = peaks;
> subplot(2, 2, 1); surf(x, y, z, x);
> subplot(2, 2, 2); surf(x, y, z, y);
> subplot(2, 2, 3); surf(x, y, z, z);

Ah, yes. It was there after all. I wondered that parameter but just
wasn't able to figure out how to use it (now it seems clear, I just
wasn't awake).

Thank you!
 | 
Pages: 1
Prev: Hilbert Peano
Next: MEX Crashes, pure C++ works