MathGroup Archive 2001

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

Search the Archive

Re: GridLines at each Tickmark

  • To: mathgroup at
  • Subject: [mg31793] Re: GridLines at each Tickmark
  • From: Tom Burton <tburton at>
  • Date: Sun, 2 Dec 2001 04:25:13 -0500 (EST)
  • References: <9ua3oi$192$>
  • Sender: owner-wri-mathgroup at


Suppose this the plot in question:

p = Plot[x, {x, -1, 1}]; 

t = Ticks /. AbsoluteOptions[p]; 

extract the positions of the ticks

g = Map[First, t, {2}];   (* or g = t[[All,All,1]] *)

and feed these to the GridLines option:

Show[p, GridLines -> g]

On Sat, 1 Dec 2001 08:18:26 +0000 (UTC), in comp.soft-sys.math.mathematica you wrote:

>Hey -
>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?

Tom Burton

  • Prev by Date: plot on Alpha Linux not working
  • Next by Date: Re: GridLines at each Tickmark
  • Previous by thread: GridLines at each Tickmark
  • Next by thread: Re: GridLines at each Tickmark