Re: ListPlot3D
- To: mathgroup at smc.vnet.net
- Subject: [mg3577] Re: ListPlot3D
- From: ianc (Ian Collier)
- Date: Mon, 25 Mar 1996 21:35:45 -0500
- Organization: Wolfram Research, Inc.
- Sender: owner-wri-mathgroup at wolfram.com
In article <4ilsru$dh5 at ralph.vnet.net>, Pesce Lorenzo
<fish at onsager.fh.huji.ac.il> wrote:
> Dear Experts,
> I have a question.
>
> I work on Mathematica 2.2 for unix with SiliconGraphic machines.
>
> I'm trying to Make a ListPlot3D using a color function defined with
> another array.
>
> the command line is :
>
> ListPlot3d[{funarray,colorarray}]
>
> Color array is an array defined via
>
> Colorarray = Map[GrayLevel,phasearray]
>
> Where phasearray and funarray are respectively [nx-1,ny-1] and
> [nx,ny].
>
> Phase array is bounded between 0 and 1.
>
> What am I doing wrong?
>
>
> Thanks in advance,
>
> Lorenzo
This will do what you want:
data = {{1,2,4,3}, {1,2,32,1},{5,4,3,1},{8,7,5,9}};
color = Map[ GrayLevel, {{1,.6,.4}, {1,.2,1},{.5,.4,1}},{2}]
ListPlot3D[ data, color]
Note that you do not need to place the arguments to ListPlot3D
in braces.
I hope this helps.
--Ian
-----------------------------------------------------------
Ian Collier
Wolfram Research, Inc.
-----------------------------------------------------------
tel:(217) 398-0700 fax:(217) 398-0747 ianc at wolfram.com
Wolfram Research Home Page: http://www.wolfram.com/
-----------------------------------------------------------
==== [MESSAGE SEPARATOR] ====