Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: 'show' command

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130448] Re: 'show' command
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Thu, 11 Apr 2013 04:15:09 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

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 at iee.lu






  • Prev by Date: Re: How do you configure Mathematica 9 to
  • Next by Date: Re: Reading a file in reverse order --- How?
  • Previous by thread: Re: 'show' command
  • Next by thread: Simplify a complex expression