Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

'show' command

35 views
Skip to first unread message

kuzu...@gmail.com

unread,
Apr 9, 2013, 4:04:35 AM4/9/13
to
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]

Bob Hanlon

unread,
Apr 10, 2013, 12:49:36 AM4/10/13
to

Use Show vice show. All Mathematica commands start with a capital letter.


Bob Hanlon

Waclaw Kusnierczyk

unread,
Apr 10, 2013, 1:52:18 PM4/10/13
to
Your code is not reproducible (what is data?), but consider using Show
instead of show.

vQ

kuzu...@gmail.com

unread,
Apr 11, 2013, 4:11:01 AM4/11/13
to
It worked thanks.
T

Alexei Boulbitch

unread,
Apr 11, 2013, 4:11:29 AM4/11/13
to
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.b...@iee.lu




0 new messages