Dear all,
I have data (called “t20” here) of the form [{x1, y1, z1}, {x2, y2, z2}, …}] which I have created a 3D plot with using ListPlot3D. I would really like to view cross sections along the xz and yz planes. After some fiddling around, I have:
Manipulate[
If[XorY == "y=c",
Grid[{{ListLinePlot[t20[[All, {1, 3}]] /. y -> c,
AxesLabel -> {"x", "z"}, PlotStyle -> Thick,
ImageSize -> {275, 275}],
ListPlot3D[t20, Mesh -> {{0}, {{c, Thick}}},
ImageSize -> {275, 275}]}}],
Grid[{{ListLinePlot[t20[[All, {2, 3}]] /. x -> c,
AxesLabel -> {"y", "z"}, PlotStyle -> Thick,
ImageSize -> {275, 275}],
ListPlot3D[t20, Mesh -> {{{c, Thick}}, {0}},
ImageSize -> {275, 275}]}}]],
{{XorY, "x=c", "direction"}, {"x=c", "y=c"},
ControlType -> Setter}, {{c, 0, "c"}, 0, 500000,
Appearance -> "Labeled"}]
which isn’t quite right!
How do i plot just an individual cross section rather than have them all stacked together?
I guess the “All” in
ListLinePlot[t20[[All
isn’t right? Or have I done something else foolish?
Please help! I’m sure this must be a simple problem to solve, but I’m not very familiar with using Mathematica.
Suggestions welcome!!
Many thanks,
Smita.
