Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: GridLines

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55245] Re: GridLines
  • From: "adamizer" <adam.smith at hillsdale.edu>
  • Date: Thu, 17 Mar 2005 03:30:19 -0500 (EST)
  • References: <d1940s$nom$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Give this a try:
<<Graphics`Colors`

I just load the above package to avoid having to use the
RGBColor[1,0,0] form for the different colors.  I took the liberty of
showing how to dash the grids as well as change the colors.

Plot[Sin[x], {x, 0, 10},
    GridLines -> {{Automatic, {Dashing[{0.05, 0.05}],
            Yellow}}, {Automatic, {Dashing[{0.1, 0.1}], Green}}}];

I have noted at least one buggy behavior.  The color only works with
the Automatic option.  Without the color and dashing one can specify
specifically where to put the grids (similar to Ticks) with a list such
at:

GridLines ->{{0,Pi,2 Pi,3 Pi},{-1,-0.5,0,0.5,1}}

Which works fine.  But I could not get Mathematica to do the
user-defined grid and colors.  Maybe someone else out there knows how.

Adam Smith
Steve Gray wrote:
> 1. Help says that the default color of GridLines is light blue, but
mine are black. ?? LightBlue
> would be much better.
> 2. Is there a way to control the color of GridLines in Show? There
seems to be no such thing as
> GridStyle, GridColor, GridLineStyle, etc.
> 
> Thank you for any info.


  • Prev by Date: Re: J/Link problem on Mac OS X
  • Next by Date: Re: question: re-organising equations
  • Previous by thread: Re: GridLines
  • Next by thread: Re: GridLines