1
$\begingroup$

I have this dataset

dataset1 = {{0, 10, 1.8988}, {0.234, 10, 1.546}, {0.5, 10, 1.98765}, {0.89, 10, 2.12377}, {1.01, 10, 2.345}, {1.345, 10, 2.789}, {1.908, 10, 3.123}}; dataset2={{0.12, 8, 0.3456}, {0.16, 8, 0.567}, {0.22, 8, 0.8765}, {0.367, 8, 0.9877}, {0.9876, 8, 1.234}, {1.6889, 8, 1.7889}, {1, 87655, 8, 2.123}}; dataset3={{0.267, 10, 2.56}, {0.6778, 10, 3.098}, {0.945, 10, 4.89}, {1.345, 10, 5.123}, {1.987, 10, 5.987}, {2.345, 10, 5.899}, {3.123, 10, 7.345}}; dataset4={{0.456, 13, 3.123}, {0.7643, 13, 4.1234}, {1.788, 13, 5.654}, {2.122, 13, 6.123}, {3.123, 13, 6.98}, {4.123, 13, 7.123}, {5.123, 13, 8.123}}; 

and I wrote this code to display it.

ListPointPlot3D[{dataset}, PlotStyle -> {Thick, Red}, Axes -> True, Ticks -> {{0, 0.5, 1.0, 1.5}, {14}, {0.9, 2, 2.7}}, ClipPlanesStyle -> {Opacity[6, Gray]}, AxesLabel -> {"Concentration", "Carbon atoms", "Dipole moment"}, ImageSize -> 500, FaceGrids -> None, ViewPoint -> {1.5, 14, 3}, FillingStyle -> LightBlue, Boxed -> True , BoxStyle -> {Hue[0.54, 0.46, 0.89], Thickness[0.003]}, BaseStyle -> Gray, AxesStyle -> Thick] 

The code does not give a proper 3D plot.

I want to construct a 3D plot like this one, but I was unable to do it.

$\endgroup$
2
  • 1
    $\begingroup$ Welcome to the Mathematica Stack Exchange! I'm not sure what you mean by a "proper 3D plot". Your code results in a 3D plot just fine for me - perhaps you could elaborate, and maybe include details on what you would expect to see vs what you're seeing. $\endgroup$ Commented Jan 6, 2021 at 10:01
  • 3
    $\begingroup$ You are almost there. Just remove the curly braces around the dataset. $\endgroup$ Commented Jan 6, 2021 at 10:05

1 Answer 1

1
$\begingroup$

Presuming you have data for nuclides other than ${}^{10}C$, then using ListPointPlot3D makes sense and Alexei Boulbitch's suggestion will make your data points show up. However, I would suggest some further changes to your code. I would rewrite like this:

ListPointPlot3D[dataset, PlotStyle -> {Red, AbsolutePointSize[8]}, Ticks -> {{0, 0.5, 1.0, 1.5}, {14}, {0.9, 2, 2.7}}, AxesLabel -> {"Concentration", "Carbon nuclide", "Dipole moment"}, ImageSize -> 500, ViewPoint -> {1.5, 14, 3}, Filling -> Axis, FillingStyle -> Lighter[Blue, .6], Boxed -> True, BoxStyle -> {Hue[0.54, 0.46, 0.89], Thickness[0.003]}, BaseStyle -> Gray, AxesStyle -> Thick] 

which gives

3Dplot

I've removed some options that were not needed and added the option Filling -> Axis which is needed.

However, if ${}^{10}C$ is only nuclide you have data for, it would better to make a 2D plot. Like so:

ListPlot[dataset[[All, {1, 3}]], PlotStyle -> {Red, AbsolutePointSize[8]}, Ticks -> {{0, 0.5, 1.0, 1.5}, {0.9, 2, 2.7}}, PlotLabel -> Row[{Superscript["", 10], "C"}], AxesLabel -> {"Concentration", "Dipole moment"}, ImageSize -> 500, Filling -> Axis, FillingStyle -> Lighter[Blue, .6], BaseStyle -> Gray] 

2Dplot

$\endgroup$
4
  • $\begingroup$ I want to construct a 3D plot like this. with three varying axis. But I was unable to construct this..mathematica.stackexchange.com/questions/85717/…. $\endgroup$ Commented Jan 6, 2021 at 14:03
  • 1
    $\begingroup$ @S.Pyne. But the data sample you show doesn't support making such a plot. Please edit your question so as to give us a better sample of your data. $\endgroup$ Commented Jan 6, 2021 at 14:16
  • $\begingroup$ I have attached three set of datapoint here.dataset1={{0.12, 8, 0.3456}, {0.16, 8, 0.567}, {0.22, 8, 0.8765}, {0.367, 8, 0.9877}, {0.9876, 8, 1.234}, {1.6889, 8, 1.7889}, {1, 87655, 8, 2.123}}; dataset2={{0.267, 10, 2.56}, {0.6778, 10, 3.098}, {0.945, 10, 4.89}, {1.345, 10, 5.123}, {1.987, 10, 5.987}, {2.345, 10, 5.899}, {3.123, 10, 7.345}}; dataset3={{0.456, 13, 3.123}, {0.7643, 13, 4.1234}, {1.788, 13, 5.654}, {2.122, 13, 6.123}, {3.123, 13, 6.98}, {4.123, 13, 7.123}, {5.123, 13, 8.123}}; $\endgroup$ Commented Jan 6, 2021 at 16:19
  • $\begingroup$ @S.Pyne. Posting the additional data in a comment to my answer is totally inappropriate. Please edit your question so it includes this additional data. $\endgroup$ Commented Jan 6, 2021 at 22:56

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.