MathGroup Archive 2007

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

Search the Archive

Serious Problem with GridLines

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79704] Serious Problem with GridLines
  • From: "David Park" <djmpark at comcast.net>
  • Date: Thu, 2 Aug 2007 03:50:48 -0400 (EDT)

Pre-Version 6 Mathematica had an obscure option AxesFront that was buried in 
the Graphics`FilledPlot` package. This option, when set to True, would 
ensure that both the axes and any GRID LINES were always in front of any 
other graphics. I always thought that they should make AxesFront a general 
Graphics option.

What WRI did instead, in Version 6, is automatically ensure that axes (along 
with their ticks and labels) are always in front and they let GridLines take 
the hindmost. There is no longer any (simple) way to force grid lines to be 
in front.

In the documentation they state: "In some plots, grid lines can be 
completely occluded by the image. Mesh can be used instead, to place the 
lines above the graphic." But this will only work for plots like 
DensityPlot. Generally, Mesh is no substitute at all for GridLines. Consider 
the following plot:

ListLogPlot[Table[PartitionsQ[n], {n, 50}],
 Filling -> Bottom,
 FillingStyle -> Lighter@Orange,
 Joined -> True,
 Frame -> True,
 Mesh -> True,
 GridLines -> Automatic,
 GridLinesStyle -> LightGray]

Using Mesh only puts dots along the curve. We could obtain a partial 
solution by using Opacity on the filling along with darker grid lines:

ListLogPlot[Table[PartitionsQ[n], {n, 50}],
 Filling -> Bottom,
 FillingStyle -> Opacity[0.6, Lighter@Orange],
 Joined -> True,
 Frame -> True,
 GridLines -> Automatic,
 GridLinesStyle -> Gray]

but I prefer to keep the grid lines quite faint.

If we are to lose the choice then it would be much better if GridLines were 
treated the same as Axes and were always automatically in front.

-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/




  • Prev by Date: Re: Unbearably slow plotting (v6)David Bailey,http://www.dbaileyconsultancy.co.ukDavid
  • Next by Date: Re: removing those annoying $$$$'s from local variables names?
  • Previous by thread: Re: Unbearably slow plotting (v6)David Bailey,http://www.dbaileyconsultancy.co.ukDavid
  • Next by thread: Re: Serious Problem with GridLines