Re: plot graph
- To: mathgroup@smc.vnet.net
- Subject: [mg11097] Re: plot graph
- From: Allan Hayes <hay@haystack.demon.co.uk>
- Date: Sun, 22 Feb 1998 14:55:23 -0500
- References: <6cg603$rnd@smc.vnet.net>
Irene Cheung wrote: > > I have a set of solutions. I partitioned them 3 by 3 : > {{x1,y1,z1},{x2,y2,z2},{x3,y3,z3},{x4,y4,z4},...}. I want to plot a 3D > graph. I know ListPlot[] can treat {{x1,y1},{x2,y2},...}. But > ListPlot3D[] does not give the graph I want. What is wrong ? I am > using Mathematica 3.0 . > > Give an example, I think > ListPlot3D[{{1,10,100},{2,20,200},{3,30,300},{4,40,400}}] should show a > straight line. But it doesn't. > > Thanks for help. > David Chik. ( email : h9505865@hkusua.hku.hk ) David: ListPlot3D[{{1,10,100},{2,20,200},{3,30,300},{4,40,400}}] is giving a surface apecified by heights 1 at {1,1}, 2 at {1,2}, 3 at {1,3} etc. This is the same kind of specification as is used in SurfaceGraphics, given by Plot3D for example. The line that I think you are expecting is given by Show[Graphics3D[Line[{{1,10,100},{2,20,200},{3,30,300},{4,40,400}}]]] -- Allan Hayes Training and Consulting Leicester, UK hay@haystack.demon.co.uk http://www.haystack.demon.co.uk voice: +44 (0)116 271 4198 fax: +44 (0)116 271 8642