help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: turn off the colors in a matrix plot


From: Søren Hauberg
Subject: Re: turn off the colors in a matrix plot
Date: Tue, 15 Apr 2008 22:50:01 +0200

tir, 15 04 2008 kl. 10:21 -0400, skrev Kamaraju S Kusumanchi:
> address@hidden wrote:
> 
> > Quoting Kamaraju S Kusumanchi <address@hidden>:
> > 
> >> I have a matrix, say
> >>
> >> octave:94> f=[1 2 3 4; 0 1 2 3; -1 0 1 2]
> >> f =
> >>
> >>    1   2   3   4
> >>    0   1   2   3
> >>   -1   0   1   2
> >>
> >> and I would like to plot this matrix as a surface using the row index and
> >> column index as the x, y values. That is my points in the 3-D plot would
> >> be
> >>
> >> (1,1, 1) (1,2,2) (1,3,3) (1,4,4)
> >> (2,1, 0) (2,2,1) (2,3,2) (2,4,3)
> >> (3,1,-1) (3,2,0) (3,3,1) (3,4,2)
> >>
> >> Currently I am doing this by
> >>
> >> octave:95> NX=3; NY=4; [yy, xx] = meshgrid([1:NY],[1:NX]), f=[1 2 3 4; 0
> >> 1 2 3; -1 0 1 2], mesh(xx, yy, f), xlabel("x"), ylabel("y")
> > 
> > Can't you just do:
> >    mesh (f)
> 
> 
> Nope. The plots from mesh(f) and my commands are different. Try it out and
> see for yourself.
Okay, then do 
  mesh (f.')
that is, show the transpose of 'f'.

> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]