0
$\begingroup$

I have a simple data set

plotting={{3,1,0},{4,1,3/25},{5,1,0},{6,1,0},{7,1,0},{8,1,0},{9,1,43/50},{10,1,1/50},{11,1,0},{12,1,0},{13,1,0},{14,1,0}}

As it can be seen, the values of Y-axis are the same (are equal to 1).

When I want to ListPlot3D[plotting] the result is empty.

When I added the option ListPlot3D[plotting, DataRange -> All] the result is:

ListPlot3D with the option DataRange

And it is surprising me because I expected something like (now it is hand-drawn):

Expected result

Questions:

  1. Why the result is empty until I add the option DataRange?

  2. Probably, I should know something more about ListPlot3D? Because, it seemed to me, that I wanted generate a plot of the surface with heights z_i at positions {x_i,y_i} as in Wolfram Documentation (I work in WM 11.3).

Wolfram documentation screen

$\endgroup$
3
  • 2
    $\begingroup$ Your points are colinear, so you're going to get a degenerate surface. Maybe something like this is more appropriate for your needs? Graphics3D[{Red, Line[plotting], Point[plotting], Polygon[plotting]}, BoxRatios -> 1, Axes -> True] $\endgroup$
    – flinty
    Oct 7 at 15:08
  • $\begingroup$ Thanks! But when I add more data, for example, plotting2 = {{3, 2, 3/50}, {4, 2, 1/10}, {5, 2, 0}, {6, 2, 0}, {7, 2, 0}, {8, 2, 0}, {9, 2, 21/25}, {10, 2, 0}, {11, 2, 0}, {12, 2, 0}, {13, 2, 0}, {14, 2, 0}} and plotting3 = {{3, 3, 23/50}, {4, 3, 2/25}, {5, 3, 1/25}, {6, 3, 0}, {7, 3, 1/10}, {8, 3, 0}, {9, 3, 1/25}, {10, 3, 2/25}, {11, 3, 1/25}, {12, 3, 0}, {13, 3, 2/25}, {14, 3, 2/25}} it gets something inappropriate. $\endgroup$ Oct 11 at 11:56
  • 1
    $\begingroup$ You need to modify @flinty's polygon to add the corners at the bottom. Here the bottom is set to the 3rd coordinate = 0: ListPointPlot3D[plotting3 , PlotRange -> All] /. p_Point :> { {p}, {Thick, Line @@ p}, {Opacity[0.4], EdgeForm[], Join[Polygon @@ p, Polygon[ReplacePart[p[[1, {-1, 1}]], {1, 3} | {2, 3} -> 0]], 2]} } $\endgroup$
    – Michael E2
    Oct 11 at 14:34
2
$\begingroup$

Maybe you can try this:

ListPointPlot3D[plotting]

enter image description here

EDIT

Show[ListPointPlot3D@plotting, Graphics3D@Line@plotting, 
PlotRange -> All]

enter image description here

$\endgroup$
2
  • $\begingroup$ I believe that the OP wishes the points to be connected.. $\endgroup$
    – bbgodfrey
    Oct 7 at 15:19
  • $\begingroup$ Thank you. Unfortunately, I did not remember the Line[data] function. $\endgroup$ Oct 11 at 11:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.