
Re: 'show' command
Posted:
Apr 11, 2013 4:11 AM


I wish to overlay 2 plots (p1 and p2, shown below) using 'show' however when I use the command 'show[p1, p2]' the plots are redrawn next to each other rather than being combined  which is what I want. This is not what I understand about the 'show' command, how do I solve this please?
Best, Toni
p1 = ListPointPlot3D[data, PlotRange > {{12, 43}, {20, 100}, {0.5, 100}}, TicksStyle > Directive[Black, FontFamily > "Arial", FontSize > 10], Boxed > True, BoxStyle > Directive[Thickness[0.0025], GrayLevel[0]], Axes > {True, True, False}, AxesStyle > Thickness[0.0025], PlotStyle > Directive[Orange, PointSize > Large], ViewPoint > Top, ImageSize > 200]
p2 = ListPlot3D[data, PlotRange > {{12, 43}, {20, 100}, {0.5, 100}}, TicksStyle > Directive[Black, FontFamily > "Arial", FontSize > 10], Boxed > True, BoxStyle > Directive[Thickness[0.0025], GrayLevel[0]], Axes > {True, True, False}, AxesStyle > Thickness[0.0025], PlotStyle > Directive[Specularity[White, 1]], ColorFunction > (ColorData["GrayYellowTones"][#3] &), Mesh > None, ViewPoint > Top, ImageSize > 200]
Hi, Toni,
You should use curly brackets inside Show. In the example below I took the data array from Help and used your p1, p2 with only PlotRange removed. Evaluate this:
Clear[data]; data = Table[Sin[x y], {x, 0, 3, 0.1}, {y, 0, 3, 0.1}]; p1 = ListPointPlot3D[data, TicksStyle > Directive[Black, FontFamily > "Arial", FontSize > 10], Boxed > True, BoxStyle > Directive[Thickness[0.0025], GrayLevel[0]], Axes > {True, True, False}, AxesStyle > Thickness[0.0025], PlotStyle > Directive[Orange, PointSize > Large], ViewPoint > Top, ImageSize > 200]; p2 = ListPlot3D[data, TicksStyle > Directive[Black, FontFamily > "Arial", FontSize > 10], Boxed > True, BoxStyle > Directive[Thickness[0.0025], GrayLevel[0]], Axes > {True, True, False}, AxesStyle > Thickness[0.0025], PlotStyle > Directive[Specularity[White, 1]], ColorFunction > (ColorData["GrayYellowTones"][#3] &), Mesh > None, ViewPoint > Top, ImageSize > 200]; Show[{p1, p2}]
Have fun, Alexei
Alexei BOULBITCH, Dr., habil. IEE S.A. ZAE Weiergewan, 11, rue Edmond Reuter, L5326 Contern, LUXEMBOURG
Office phone : +35224542566 Office fax: +35224543566 mobile phone: +49 151 52 40 66 44
email: alexei.boulbitch@iee.lu

