MathGroup Archive 2002

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

Search the Archive

RE: GridLines - Color of GridLines

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33278] RE: [mg33250] GridLines - Color of GridLines
  • From: "David Park" <djmp at earthlink.net>
  • Date: Wed, 13 Mar 2002 03:14:48 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Martin,

You have to construct the list containing each grid line and its associated
color, even if the color is the same for all the grid lines. You can do it
this way:

Needs["Graphics`Colors`"]

Plot[x^2, {x, -2, 2},
    Frame -> True,
    GridLines -> {Table[{i, {Gray}}, {i, -2, 2}],
        Table[{i, {Gray}}, {i, 0, 4}]},
    Axes -> None,
    PlotLabel -> "Colored Grid Lines",
    ImageSize -> 400];

The documentation on GridLines appears to be incorrect and incomplete.
First, the default grid line color does not come out LightBlue as the Help
documentation says. Secondly, each grid line style must be inside brackets,
{}, even if the style is only a single color specification. (Maybe the
reason the default doesn't come out LightBlue is that the implementers fell
into the last trap.)

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

> From: maxao [mailto:maxao at aol.com]
To: mathgroup at smc.vnet.net
>
> Hello out there,
>
> can anybody help me to get e.g. red or grey Gridlines?
>
> You can use the attached example.
>
> [Contact the author to get the example - moderator]
>
> Thank you for help,
>
> Martin
>



  • Prev by Date: symbolic recombination
  • Next by Date: DSolve differences?
  • Previous by thread: Re: GridLines - Color of GridLines
  • Next by thread: compiling