MathGroup Archive 2012

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

Search the Archive

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


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





  • Prev by Date: Interactive image cropping is extremely slow
  • Next by Date: Re: Engineering requests
  • Previous by thread: Trouble Getting Graphic Primitives in a Module to Display with Show Command
  • Next by thread: Re: Trouble Getting Graphic Primitives in a Module to Display with Show Command