Re: locating points in mathematica plots
- To: mathgroup at smc.vnet.net
- Subject: [mg57637] Re: locating points in mathematica plots
- From: Jean-Marc Gulliet <jeanmarc.gulliet at 9online.fr>
- Date: Thu, 2 Jun 2005 05:18:02 -0400 (EDT)
- Organization: New York University
- References: <d7k39c$oiq$1@smc.vnet.net>
- Reply-to: jmg336 at nyu.edu
- Sender: owner-wri-mathgroup at wolfram.com
utish_r at hotmail.com wrote: > how to locate points (coordinate), say maxima and minima values, in a > 3d plot in mathematica? > Not whether this is what you are looking for. Assuming that you use some experimental data where only "z" is provided and ListPlot3D, we generate a surfacegraphics to start with: In[100]:= data = Table[Sin[x*y] + Random[Real, {-0.15, 0.15}], {x, 0, (3*Pi)/2, Pi/15}, {y, 0, (3*Pi)/2, Pi/15}]; In[101]:= p2 = ListPlot3D[data]; The internal structure of the expression is of the form In[102]:= Shallow[FullForm[p2], {6, 2}] SurfaceGraphics[List[List[-0.0531853132797791`, 0.07470139085368`, Skeleton[21]], List[-0.04314815332538362`, -0.004767344336139311`, Skeleton[21]], Skeleton[21]], List[Rule[ PlotRange, Automatic], RuleDelayed[DisplayFunction, $DisplayFunction], Skeleton[37]]] So we can find, say, the maximum using In[103]:= Max[p2[[1]]] Out[103]= 1.12698 and the corresponding coordinates by In[104]:= Position[p2[[1]], Max[p2[[1]]]] Out[104]= {{23,9}} Hope this helps, /J.M.