65752

Mathematica ListcontourPlot3D

I have data in the form { {x,y,z,f}...} I am using ListContourPlot3D but all I get is an empty box with dimensions -1 to 1 in each direction. Here is my code:

ListContourPlot3D[data5, PlotRange -> All, AxesLabel -> {"[Beta]", "[Omega]", "Vo"}, Contours -> {1500}].

These are the first 5 points of my data:( the whole set has 55 points)

{{200, 20000 10^(1/3), 2000, 1226}, {200, 20000 10^(1/3), 2600, 1422}, {200, 20000 10^(1/3), 3200, 1581}, {200, 20000 10^(1/3), 3800, 1761}, {200, 20000 10^(1/3), 4400, 1872}}

Dimensions[data5] returns {55,4} If I do IntegerPart[data5] it does it correctly so it must recognize the numbers in my data.

I appreciate any ideas. Thank you.

Answer1:

It's hard to tell without having the entire dataset, but I am betting there is a problem with your Contours -> {1500} setting. What happens if you omit it altogether or use a different value?

Answer2:

Contours -> num Plots num equally spaced levels contours. Contours -> {num} Plots the f[x,y,z] = num contour.

Did you mean the former? I doubt ListContourPlot3D can plot your data if it is too sparse or to localized. For the data sample you gave us x and y do not vary at all. Does x and y vary enough in you final data set to well populate coordinate space?

Answer3:

@Davorak's suggestion that the data set, as written, does not seem to vary may be the cause of the problem. Assuming that is not the case, try rotating the resulting graphic, and if you see a black plane appear, then it is the color scheme that is off. By default, ListContourPlot3D produces an opaque white surface, and I've had issues where it did not seem to produce anything, but it was just invisible. The solution: add a ContourStyle option, and set it to something like Red.

Answer4:

The problem is using the {x,y,z,f} form of ListContourPlot3D at low resolution. I stumbled over this a few weeks ago as well, here is a minimal example of the bug:

xyzfdata[r_] := Flatten[#, 2] &@Table[{x, y, z, x^2 + y^2 + z^2 - 1}, {x, -2, 2, r}, {y, -2, 2, r}, {z, -2, 2, r}]; (* Low resolution {x,y,z,f} fails *) ListContourPlot3D[xyzfdata[1], Contours -> {0}]

The solution in my case (I had my data on a grid) was to use the grid form and DataRange:

fdata[r_] := Table[x^2 + y^2 + z^2 - 1, {z, -2, 2, r}, {y, -2, 2, r}, {x, -2, 2, r}]; (* Low resolution works ok for array data *) ListContourPlot3D[fdata[1], Contours -> {0}, DataRange -> 2 {{-1, 1}, {-1, 1}, {-1, 1}}]

I think the issue is that for the {x,y,z,f} form, the implementation uses interpolation in a way that fails at low resolution. Upping the resolution in the first example, everything works:

(* Higher resolution {x,y,z,f} works *) ListContourPlot3D[xyzfdata[.2], Contours -> {0}]

Recommend

  • Change how [DataType.Currency] renders html
  • Encapsulating strings of variables in bash
  • Which to use , abstract class or interface in F#?
  • Log scale (x axis) histogram
  • SSH, run process and then ignore the output
  • Merging rows with shared information
  • RabbitMQ BasicConsume and Event Driven Issues relating to Console.ReadLine()
  • Fixing GLSL shaders for Nvidia and AMD
  • How do I store this JSON object as a cookie and than read it in vanilla javascript?
  • Python, Numpy, OpenCV — Creating a modified (and equally fast) “addWeighted” function
  • xslt - referencing the output result of the previous template
  • interpolation in 3d computer graphics
  • What to use (best/good practice) for the secret key in HMAC solution?
  • Exporting SAS DataSet on to UNIX as a text file…with delimiter '~|~'
  • Concise regex extract function in XSLT 2.0
  • undefined reference error due to use of static variables [duplicate]
  • Fraction length
  • Stacked Bar Chart with percentage composition inside the Bar and total above the Bar in JFreeChart
  • Can you use DataSet and DataTables in a Portable Class Library
  • Efficient algorithm to find additions and removals from 2 collections
  • How to access meteor package name inside package?
  • How do I get the list of bad records that didn't load in Bigquery?
  • quiver not drawing arrows just lots of blue, matlab
  • How to get latest version of a artifact on Bintray using JSONP
  • Tell Git to stop prompting me for conflicts when none really exist?
  • How to return DataSet (xsd) in WCF
  • Suppressing passwd when calling sqlplus from shell script
  • Ember.js model to be organised as a tree structure
  • Thread safety of a fluent like class using clone() and non final fields
  • WPF - CanExecute dosn't fire when raising Commands from a UserControl
  • C# - Is there a limit to the size of an httpWebRequest stream?
  • MySQL WHERE-condition in procedure ignored
  • vba code to select only visible cells in specific column except heading
  • 'TypeError' while using NSGA2 to solve Multi-objective prob. from pyopt-sparse in OpenMDAO
  • Do I've to free mysql result after storing it?
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • json Serialization in asp
  • How get height of the a view with gone visibility and height defined as wrap_content in xml?
  • Linking SubReports Without LinkChild/LinkMaster
  • How to Embed XSL into XML