ListPlot3D can't plot data of an almost vertical surface?
We can convert Polygon
to MeshRegion
and then plot it with RegionPlot3D
:
Show[ListPlot3D[data1], RegionPlot3D[DiscretizeGraphics[Polygon[data2]], Mesh -> 10]]
Update: To have the colors in the two plots match the colors in a single plot with PlotTheme -> "Business"
:
colors = "DefaultPlotStyle" /. Method /. Charting`ResolvePlotTheme["Business", ListPlot3D]);
Show[ListPlot3D[data1, PlotTheme -> "Business"],
MapAt[10^-17 # &, #, {1, 1, 1, All, 2}] &@
ListPlot3D[MapAt[10^17 # &, data2, {All, 2}], PlotRange -> All,
PlotStyle -> colors[[2]], PlotTheme -> "Business"],
ImageSize -> Large, ViewPoint -> {3, 1, 1.5}]
Original answer:
You can (1) scale the second column of data2
(so that it is not almost constant), (2) use ListPlot3D
and (3) post-process to reverse the scaling:
Show[ListPlot3D[data1],
ListPlot3D[MapAt[10^17 # &, data2, {All, 2}], PlotRange -> All] /.
GraphicsComplex[a_, b___] :> GraphicsComplex[MapAt[10^-17 # &, a, {All, 2}], b],
ImageSize -> Large, ViewPoint -> {3, 1, 1.5}]
Or
Show[ListPlot3D[data1],
MapAt[10^-17 # &, #, {1, 1, 1, All, 2}] &@
ListPlot3D[MapAt[10^17 # &, data2, {All, 2}], PlotRange -> All],
ImageSize -> Large, ViewPoint -> {3, 1, 1.5}]
same picture
Alternatively, plot data2
with the option ScalingFunctions -> {None, {10^17 # &, 10^-17 # &}, None}
and post-process the output to undo the scaling:
Show[ListPlot3D[data1],
MapAt[10^-17 # &, #, {1, 1, 1, All, 2}] &@
ListPlot3D[data2, ScalingFunctions -> {None, {10^17 # &, 10^-17 # &}, None},
PlotRange -> All],
ImageSize -> Large, ViewPoint -> {3, 1, 1.5}]
same picture
Note: For version 11.3 (Windows 10) use MapAt[10^-17 # &, #, {1, 1, All, 2}] &
.