Re: Re: Setting gridlines thickness in Plot

*To*: mathgroup at smc.vnet.net*Subject*: [mg59033] Re: [mg58959] Re: [mg58939] Setting gridlines thickness in Plot*From*: Omega Consulting <info at omegaconsultinggroup.com>*Date*: Wed, 27 Jul 2005 01:25:04 -0400 (EDT)*References*: <200507250512.BAA04831@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

This is a case where AbsoluteOptions can be very useful. Plot with the default set of lines. In[1]:= pl=Plot[x,{x,0,1}, GridLines->Automatic, Frame->True] AbsoluteOptions gives the explicit setting equivalent to the Automatic settings. In[2]:= {lines, ticks} = {GridLines, FrameTicks} /. AbsoluteOptions[pl]; Here's what 1 gridline looks like. In[3]:= lines[[1,1]] Out[3]= {0.,{RGBColor[0.,0.,0.5],AbsoluteThickness[0.25]}} We then alter the lines and ticks to the form we want. In[4]:= newlines = lines /._AbsoluteThickness->AbsoluteThickness[1.25]; In[5]:= newticks = ticks/._AbsoluteThickness->AbsoluteThickness[1]; And plot again with the new settings. In[6]:= Plot[x, {x, 0, 1}, GridLines -> newlines, Frame -> True, FrameStyle -> AbsoluteThickness[2], FrameTicks -> newticks] ---------------------------------------------- Omega Consulting The final answer to your Mathematica needs. http://omegaconsultinggroup.com On Jul 25, 2005, at 12:12 AM, David Park wrote: > For the frame there is the option FrameStyle. > > If you look at the Help for Ticks and GridLines you will see that > there are > methods for specifying the style of the Lines. However you then have to > specify all of the ticks and grid lines. > > David Park > djmp at earthlink.net > http://home.earthlink.net/~djmp/ > > From: carlos at colorado.edu [mailto:carlos at colorado.edu] To: mathgroup at smc.vnet.net > To: mathgroup at smc.vnet.net > > > The problem: > > The default thickness of framelines, gridlines and tickmarks in Plot [] > is 0.25pt. This is too thin for typical figure reductions in journals > & books, and > may disappear from the printed version. > > The question: > > I want to set the thickness of frameline, gridlines and ticks to 2, > 1.25 and 1 pt, respectively. These are good values for typical paper > figures. How do I do > that? > > (At the moment I do it with Illustrator postprocessing) > > Note: the online help is not much help. There a passing mention on > setting > Gridlines thickness with PlotStyle, but no examples. What would be > nice is to > reset the defaults once and for all. > > Thanks for any help. >

**References**:**Re: Setting gridlines thickness in Plot***From:*"David Park" <djmp@earthlink.net>