Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #8989

Re: Trouble Getting Graphic Primitives in a Module to Display with Show Command

From David Bailey <dave@removedbailey.co.uk>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Trouble Getting Graphic Primitives in a Module to Display with Show Command
Date 2012-03-13 08:05 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jjmv3t$cgn$1@smc.vnet.net> (permalink)

Show all headers | View raw


On 12/03/2012 09:11, Kenneth Bures wrote:
> Clear[sketchEarthOrbit];
> sketchEarthOrbit[] :=
>    Module[{earth, sun, orbit},
>     earth =
>      Graphics[{ Disk[{-.7, .35}, 0.05], Text["Earth", {-.7, .45}] }];
>     sun = Graphics[{ Disk[{.3, 0}, 0.1], Text["Sun", {.3, .17}] }];
>     orbit = Graphics[{ Circle[{0, 0}, {1., .5}] }];
>     Show[orbit, sun, earth, AspectRatio ->  Automatic]
>     ];
> sketchEarthOrbit[];

If you remove the very last ; from the line sketchEarthOrbit[]; line, it 
will work!

The semicolon suppresses the output from the function call. The book was 
probably written prior to version 6, when graphics was organised in a 
slightly different way.

David Bailey
http://www.dbaileyconsultancy.co.uk


Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Trouble Getting  Graphic Primitives in a Module to Display with Show Command David Bailey <dave@removedbailey.co.uk> - 2012-03-13 08:05 +0000

csiph-web