MathGroup Archive 2001

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

Search the Archive

Re: GridLines at each Tickmark


In a message dated 2001/12/1 3:30:45 AM, rrosario11 at my-deja.com writes:

>How can I get Mathematica to draw gridlines at each tickmark on a 2D
>plot without having to manually input each point? I am trying to
>create a "graph paper like" grid. Is this possible?

Needs["Graphics`Colors`"];

For GridLines at the major ticks use the Plot option GridLines -> Automatic

For a dense grid, i.e., GridLines at all ticks, then

Show[
    p1 = Plot[(x-3)(x-6), {x,0,9}, 
        PlotStyle->Red,
        DisplayFunction -> Identity], 
    Frame -> True, 
    Axes -> False, 
    GridLines -> (#[[All,1]]& /@ 
          (Ticks /. AbsoluteOptions[p1])), 
    DisplayFunction->$DisplayFunction];


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: Re: GridLines at each Tickmark
  • Next by Date: Re: GridLines at each Tickmark
  • Previous by thread: Re: GridLines at each Tickmark
  • Next by thread: Re: GridLines at each Tickmark