Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alexei Boulbitch

Posts: 479
Registered: 2/28/08
Re: 'show' command
Posted: Apr 11, 2013 4:11 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.