MathGroup Archive 2002

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

Search the Archive

Re: Forcing a Tick at Zero?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33829] Re: [mg33800] Forcing a Tick at Zero?
  • From: BobHanlon at aol.com
  • Date: Fri, 19 Apr 2002 02:28:06 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 4/16/02 5:33:31 AM, siegman at stanford.edu writes:

>The list produced by the following contains labelled ticks at -20, -10,
>0, 10 
>and 20 and unlabelled ticks at -15, -5, 5 and 15, as expected:
>
>   xticks = Table[{k, If[Mod[k, 10] == 0, ToString[k], " "]}, {k, -20,
>20, 5}]
>
>But the following still doesn't force a labelled tick at x=0 as wanted:
>
>   Plot[ - - - - ,Ticks->{xticks,Automatic}, - - - -]
>

xticks = Table[{k, If[Mod[k, 10] == 0, ToString[k], " "]}, {k, -20, 20, 5}];

You can either move the axes out of the way

Plot[x, {x,-20,20},
    Ticks->{xticks,Automatic},
    AxesOrigin->{-2.5,0}];

or eliminate the axes

Plot[x, {x,-20,20},
    FrameTicks->{xticks,Automatic},
    Frame->True,Axes->False];


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: Re: animations in mathematica
  • Next by Date: Bug in Sum causes index variable to remain set?
  • Previous by thread: Forcing a Tick at Zero?
  • Next by thread: Driving me nuts