MathGroup Archive 2006

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

Search the Archive

RE: Labelled ticks at the origin

  • To: mathgroup at
  • Subject: [mg70865] RE: [mg70840] Labelled ticks at the origin
  • From: "David Park" <djmp at>
  • Date: Mon, 30 Oct 2006 05:32:31 -0500 (EST)

Why do you use an Axes plot and put ticks and labels all across your
beautiful function or data? You will very seldom, if ever, see anything like
that in a top technical journal.

Use a two sided Frame and the function is not stomped on and the zero tick
label comes back.

Plot[2.1 Sin[2 Pi x], {x, 0, 1},
    PlotRange -> {{0, 1}, {-2.1, 2.1}},
    Frame -> {True, True, False, False},
    FrameTicks -> {{0.5, 1}, {-2, -1, 0, 1, 2}},
    AxesStyle -> GrayLevel[0.8]];

David Park
djmp at

From: AES [mailto:siegman at]
To: mathgroup at

Many of us have noted, and even discussed on this group, Mathematica's
inexplicable -- or is it just obstinate? -- refusal to put labelled Tick
marks at the origin, even when there's plenty of room for them and no
interfering axis in the way, or even an explicit request to do so, e.g.

   PlotRange->{{0, 1}, {-2.1, 2.1}};
   Ticks->{{0.5, 1.0}, {-2, -1, 0, 1, 2}};

This note is just to put on record a minor gimmick that most Mathematica
experts probably already know:  if you convert the second line to

   Ticks->{{0.5, 1.0}, {-2, -1, {0.001,"0"}, 1, 2}};

you'll get just what you want (unless of course Mathematica decides to
strike back at you in some hidden way elsewhere as punishment for your
sneaking around its rigid rules and regulations).

  • Prev by Date: Re: How to change file names?
  • Next by Date: Re: Re: "unload" a package
  • Previous by thread: Re: Labelled ticks at the origin