Re: GridLines issue

*To*: mathgroup at smc.vnet.net*Subject*: [mg57218] Re: [mg57172] GridLines issue*From*: "David Park" <djmp at earthlink.net>*Date*: Sat, 21 May 2005 02:39:33 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

Using the DrawGraphics package from the Mathematica page on my web site below I would do this in the following manner. Needs["DrawGraphics`DrawingMaster`"] Draw2D[{Draw[Sin[x], {x, 0, 6Pi}]}, Frame -> True, FrameTicks -> {CustomTicks[Identity, {0, 6Pi, Pi, 4}], CustomTicks[Identity, {-1, 1, 0.2, 5}, CTNumberFunction -> Chop], CustomTicks[Identity, {0, 6Pi, Pi, 4}, CTNumberFunction -> ("" &)], CustomTicks[Identity, {-1, 1, 0.2, 5}, CTNumberFunction -> ("" &)]}, GridLines -> {CustomGridLines[Identity, {0, 6Pi, Pi/2}, {Gainsboro}], CustomGridLines[Identity, {-1, 1, 0.2}, {Gainsboro}]}, PlotLabel -> "Plot With Custom Grid and Ticks", Background -> Linen, ImageSize -> 450]; I made several modifications from your initial specification. I used a plot frame instead of Axes. With an axes plot such as this the x-tick labels appear right in the middle of the plot and step all over the curve. If you look in Science magazine, for example, you will never see axes plots but always frame plots. Secondly, instead of using Red for the grid lines I used Gainsboro, which is a very light gray. Again, Red grid lines would step all over the curve. It is the curve and not the grid lines that is important. By using light gray or Gainsboro we are using Edward Tufte's principle of "minimum effective difference" to put in ancillary information. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: marloo3 at mail15.com [mailto:marloo3 at mail15.com] To: mathgroup at smc.vnet.net hi all how could i color the gridlines in the plot: Plot[Sin[x], {x, 0, 6Pi}, Ticks -> {{0, Pi/2, Pi,3Pi/2, 2Pi}, Automatic}, GridLines -> Automatic]; only in Red while the plot in Black, and to make the gridlines pass vertically only on the spacings of Pi/2 for all the plot range and pass horizontally on the spacings of 0.2 and not of 0.5 as it is automatically. thanks