MathGroup Archive 2006

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

Search the Archive

Re: On order of options to Graphics[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70575] Re: On order of options to Graphics[]
  • From: dh <dh at metrohm.ch>
  • Date: Fri, 20 Oct 2006 05:21:38 -0400 (EDT)
  • References: <egfrt7$qkl$1@smc.vnet.net>


Hi Nasser,

Thickness changes all the drawings that are specified afterwards. By 

this you may have different linewidth in your graphics. E.g.:

Show[Graphics[{Thickness[0.1], Line[{{0, 0}, {1, 0}}], Thickness[0.05],

         Line[{{1, 0}, {1, 1}}], Thickness[0.01], Line[{{1, 1}, {0, 1}}]}]]

Daniel



Nasser Abbasi wrote:

> 5.2 on XP:

> 

> It seems strange to me that the order of arguments in this example should 

> have made a difference, but it does:

> 

> When I write Thickness[] After Line[] it has no effect. But before, it does:

> 

> Show[  Graphics[    {  Line[{{1, 0}, {1, 6}}],   Thickness[0.1] }   ]  ] 

> (*does not work eq(1)*)

> 

> Show[  Graphics[    {  Thickness[0.1],  Line[{{1, 0}, {1, 6}}]  }   ]  ] 

> (*now it works  eq(2)*)

> 

> From help it says:

> 

>           Graphics[ primitives, options]

> 

> Then It gives Line[] as an example of a graphic primitive, and Thickness[] 

> as an example of graphics Directive. But help did NOT say which order the 

> primitive and directive should have with respect to each others. It just 

> says "the following directives can be used" and leaves it up to the user to 

> figure that the order of primitive and directive is important.

> 

> So based on this little experiment, One must write

> 

>          Graphics[  {  Directive, Primitive } ]  ----> maps to eq (2) which 

> works

> 

> and not

> 

>         Graphics[  { Primitive, Directive } ] ----> maps to eq(1)

> 

> It seems more logical to me to write {Primitive,Directive}. But this does 

> not work. One must have the Directive before the Primitive.

> 

> I wish the help can be more detailed. I find Mathematica help hard to follow 

> many times. Mathematica help needs to be more detailed.

> 

> Nasser

> 

> 



  • Prev by Date: Re: Weird (but reproducible) screen display glitch: \[ImaginaryI] appears as just "i"
  • Next by Date: Re: damped oscilations data fit
  • Previous by thread: RE: On order of options to Graphics[]
  • Next by thread: How to change repeat rate ?