Re: Trouble Getting Graphic Primitives in a Module to Display with Show Command
- To: mathgroup at smc.vnet.net
- Subject: [mg125414] Re: Trouble Getting Graphic Primitives in a Module to Display with Show Command
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Tue, 13 Mar 2012 03:03:24 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
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