MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Log axis in ListPlot3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg102047] Re: Log axis in ListPlot3D
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Mon, 27 Jul 2009 06:12:28 -0400 (EDT)

Is there a way to plot a log axis in ListPlot3D (or any 3D graph command)
without using Ticks to explicitly plot log-scale tick marks?  Basically I'm
wishing there was a 3D equivalent of ListLogLinearPlot.

In the example below I would like a log-scale on the x axis. I've gotten
around it by plotting the data using ListPlot3D[{{xi,yi,zi}...}] and
explicitly making log scale tick marks using Ticks, but feel there must be a
better way.

Any suggestions would be informative and helpful.

T



DataSet = {{1.6109253532158105`, 1.4931577390442954`, 1.4052306981890188`,
   1.388296872543274`, 1.3781554168518506`, 1.2474079127007878`,
   1.0502290276422424`, 1.0034557078216464`,
   1.0008671342568338`}, {1.5358146282982208`, 1.4256112793494977`,
   1.3428173487678112`, 1.3317869945705558`, 1.3356328822944896`,
   1.2397347934946499`, 1.0551945672056298`, 1.0028855287248455`,
   1.000671783940541`}, {1.5139953162744815`, 1.4051418833868858`,
   1.3218676111468153`, 1.3100968560425401`, 1.314514769161855`,
   1.2282950727581101`, 1.057456270622821`, 1.0026705294534184`,
   1.0006008501002788`}, {1.5032365655414848`, 1.3948034202644648`,...

Hi, Tamara,

It seems that your data is in some odd format for 3d plot: 9 items in the sublist.
{1.6109253532158105`, 1.4931577390442954`, 1.4052306981890188`,
   1.388296872543274`, 1.3781554168518506`, 1.2474079127007878`,
   1.0502290276422424`, 1.0034557078216464`,
   1.0008671342568338`}
I am not quite sure to have understood your question correctly. If I have got you right, you may try the following:

(* This are three sets of data to show in different types of log plots *)
(* I used instead of yours only to have a usual format {...{x,y,z}...}: *)

DataSet1 = 
  Flatten[Table[{x, y, (Exp[x] + RandomReal[{0, 5}])*Exp[-y]*y^2}, {x,
      1, 10, 1}, {y, 1, 10, 0.1}], 1];
DataSet2 = 
  Flatten[Table[{x, y, (x^5 + RandomReal[{0, 5}])*Exp[y^2]}, {x, 1, 
     100, 1}, {y, 1, 15, 0.1}], 1];
DataSet3 = 
  Flatten[Table[{x, y, (Log[10, x] + RandomReal[{0, 5}])*y^2}, {x, 1, 
     100, 1}, {y, 1, 5, 0.1}], 1];

(* Here are mappings that you might wish to apply  *)

g1[{x_, y_, z_}] := {x, y, Log[10, z]};
g2[{x_, y_, z_}] := {Log[10, x], y, Log[10, z]};
g3[{x_, y_, z_}] := {Log[10, x], y, z};

dataset1 = Map[g1, DataSet1];
dataset2 = Map[g2, DataSet2];
dataset3 = Map[g3, DataSet3];


(* and plot them *) 

ListPlot3D[dataset1]
ListPlot3D[dataset2]
ListPlot3D[dataset3]

Hope it helps. Alexei

-- 
Alexei Boulbitch, Dr., habil.
Senior Scientist

IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern
Luxembourg

Phone: +352 2454 2566
Fax:   +352 2454 3566

Website: www.iee.lu

This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.




  • Prev by Date: Re: Re: solving a system of two equations
  • Next by Date: Re: Mathematica Animations by High School Students
  • Previous by thread: Log axis in ListPlot3D
  • Next by thread: Logarithmic ticks in SectorChart