Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: 'show' command
Replies: 4   Last Post: Apr 11, 2013 4:11 AM

 Messages: [ Previous | Next ]
 Alexei Boulbitch Posts: 483 Registered: 2/28/08
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,
L-5326 Contern, LUXEMBOURG

Office phone : +352-2454-2566
Office fax: +352-2454-3566
mobile phone: +49 151 52 40 66 44

e-mail: alexei.boulbitch@iee.lu

Date Subject Author
4/10/13 Bob Hanlon