Re: "If" tests inside call to Graphics3D
- To: mathgroup at smc.vnet.net
- Subject: [mg86323] Re: "If" tests inside call to Graphics3D
- From: David Bailey <dave at Remove_Thisdbailey.co.uk>
- Date: Sat, 8 Mar 2008 05:43:18 -0500 (EST)
- References: <fqqs1l$kdk$1@smc.vnet.net>
Steve Gray wrote: > I want to make Boxed->, Axes->, AxesLabel->, and a bunch of individual > display items conditioned on various flags inside my call to > Graphics3D. When I do this, for example, with: > > If[boxflg==1, options or items 1, options or items 2] > > in my call, it says "An improperly formatted option was encountered > while reading a Graphics. The option was not in the form of a rule." > > How do I do this? Thanks in advance. > > Steve Gray > I have often used this myself - so I suggest you post some actual code. Note that if you want the second 'option or item' to be nothing, you need to splice in an empty Sequence: If[boxflg==1,something,Sequence@@{}] Note that if you display the resultant graphic in InputForm you will be able to see the structure after evaluation of the IF's, and that may reveal the problem. David Bailey http://www.dbaileyconsultancy.co.uk