Re: Style options with GridLines
- To: mathgroup at smc.vnet.net
- Subject: [mg9392] Re: [mg9107] Style options with GridLines
- From: Allan Hayes <hay at haystack.demon.co.uk>
- Date: Sun, 2 Nov 1997 01:02:23 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Sean Ross <seanross at worldnet.att.net> [mg9107] Style options with GridLines > I was attempting to get gridlines to display with a thickness of my > choosing and discovered that the style option for gridlines doesn't > seem to work unless a color or graylevel option is chosen as well. Sean: The rationale seems to be that the automatic style for grid lines is {RGBColor[0.,0.,0.5], AbsoluteThickness[0.25]} and this is used if we only specify the position of the tick. However the underlying default style is {GrayLevel[0.], AbsoluteThickness[0.25]}; and if we try to specify a style as well as position (this must be in the form {position, {directive,..}} ) then we must specify *all* changes of style from this *default* style -- not from the automatic style: Example: In[1]:= gr2 = Plot[x Sin[x], {x, 0, 6}, GridLines -> { {1, (*gives automatic style*) {2,{Hue[0], Thickness[0.02]}}, {3,{Thickness[0.02]}},(*gives default color*) {4,{Hue[0.3]}}(*gives default thickness*), (*the following are not proper style instructions and give default style*) {5,{xxxx}}, {6,Hue[.5]}(*should be {Hue[.5]}*) }, None } ]; We can examine the style directives actually used: In[2]:= FullOptions[gr2,GridLines] Out[2]= {{{1.,{RGBColor[0.,0.,0.5],AbsoluteThickness[0.25]}}, {2.,{Hue[0],Thickness[0.02]}}, {3.,{GrayLevel[0.],Thickness[0.02]}}, {4.,{Hue[0.3],AbsoluteThickness[0.25]}}, {5.,{GrayLevel[0.],AbsoluteThickness[0.25]}}, {6.,{GrayLevel[0.],AbsoluteThickness[0.25]}}}, {} } Reference: GridLines in the Help Browser - though the distinction between automatic and default styles is not made. Allan Hayes hay at haystack.demon.co.uk http://www.haystack.demon.co.uk/training.html voice:+44 (0)116 2714198 fax: +44 (0)116 2718642 Leicester, UK