Re: Axes for ListPlot3D
- To: mathgroup at smc.vnet.net
- Subject: [mg33527] Re: Axes for ListPlot3D
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Fri, 29 Mar 2002 06:13:09 -0500 (EST)
- References: <a7jto5$ft7$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"Allan de Frates" <allan.c.defrates at boeing.com> wrote in message news:a7jto5$ft7$1 at smc.vnet.net... > Hello, > > Is there a way to change the axes values when using ListPlot3D? The axes > always run from 1 to the highest element number. I would like to change > them to correspond to the actual values used to generate data. For > instance, I generate some data using Table[x+y,{y,-3,4},{x,3,8}] and > then feed it to ListPlot3D. The x axis runs from 1 to 6 and the y axis > runs from 1 to 8. What I want is the x axis to run from 3 to 8 the the y > axis to run from -3 to 4. > > ListPlot allows the use of x,y pairs which assigns specific values to > the x axis, but I can't figure out how to do the analogous thing for > ListPlot3D. > > Allan de Frates Allan, You need the option MeshRange tb=Table[x+y,{y,-3,10},{x,3,8}]; ListPlot3D[tb, MeshRange ->{{3,8},{-3,10}}] -- Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565