MathGroup Archive 2001

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

Search the Archive

Re: GridLines at each Tickmark


Sure,

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?
>
>Thanks,
>Ryan

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