Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.3K Views
|
4 Replies
|
3 Total Likes
View groups...
Share
Share this post:

ListLogPlot3D - possible ?

Posted 10 years ago

How can I make a ListLogPlot3D with Mathematica? Is it possible?

POSTED BY: Andrea Burlon
4 Replies
POSTED BY: Sander Huisman
POSTED BY: Sander Huisman
Posted 10 years ago

This can likely be improved, but:

data = Flatten[
   Table[{x, y, 220 - x^2 - y^2}, {x, -10, 10}, {y, -10, 10}], 1];

listLogPlot3D[data_, opts___] := Module[{logData, zDivisions, zTicks},
  logData = 
   Select[data, #[[3]] > 0 &] /. {x_, y_, z_} -> {x, y, Log10[z]};
  zDivisions = 
   Select[FindDivisions[MinMax[data[[All, 3]]], 10], # > 0 &];
  zTicks = {Log10[#], #} & /@ zDivisions;
  ListPlot3D[logData, Ticks -> {Automatic, Automatic, zTicks}, opts]
  ]

listLogPlot3D[data, AspectRatio -> 1]

enter image description here

(Sorry, Sander. We were both working at the same time. ;-) )

POSTED BY: David Keith

This has been a request by me already many many times; being able to scale whatever Axis in whatever type of plot.... It is possible, but you have to do some trickery to do this.... We cheat the system by replacing the tickmarks. (Which is what LogPlot and related functions do). Here is an example:

data=Catenate[Table[{x,y,x^2+y^3},{x,1,10},{y,1,20}]];
data[[All,3]]=Log10[data[[All,3]]];
verticalticks={#,"10"^#}&/@Range[Floor[Min[data[[All,3]]]],Ceiling[Max[data[[All,3]]]],1];
ListPointPlot3D[data,Ticks->{Automatic,Automatic,verticalticks}]

enter image description here

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard