[Date Index]
[Thread Index]
[Author Index]
Re: FrameTick Problem
*To*: mathgroup at smc.vnet.net
*Subject*: [mg35128] Re: FrameTick Problem
*From*: timreh719 at yahoo.com.tw (bryan)
*Date*: Tue, 25 Jun 2002 03:42:56 -0400 (EDT)
*References*: <af6ijd$lmn$1@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
qualsystems*nospam* at mindspring.com wrote in message news:<af6ijd$lmn$1 at smc.vnet.net>...
> Can anyone help with this ?
>
> Here is the FrameTick example from the online help.
>
> Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True, FrameTicks -> {{0, Pi/2,
> Pi, 3 Pi/2, 2 Pi}, {-1, 0, 1}}]
>
> So far, so good.
>
> Now what if you want to change the y axis FrameTicks so that they
> range from say -2 to 2 instead of -1 to 1. So one would believe that
> the FrameTicks option would be changed accordingly but the command
> below does not accomplish this.
>
> Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True, FrameTicks -> {{0, Pi/2,
> Pi, 3 Pi/2, 2 Pi}, {-2, 0, 2}}]
>
> Can someone explain why this does not work and what would ?
>
> Thanks
>
Dear friend:
The reason that you can't change it's y ticks from {-1,0,1} to
{-2,0,2} is that you exceed the range you plot . So , we have to
broaden the plot range if you want to use the ticks {-2,0,2}. i.e.
Plot[Sin[x], {x, 0, 2 Pi}, Frame -> True,
FrameTicks -> {{0, Pi/2, Pi, 3 Pi/2, 2Pi}, {-2, 0, 2}},
PlotRange -> {-2, 2}]
This is the key to the problem . I hope this helps you.
bryan
sincerely
Prev by Date:
**Re: FrameTick Problem**
Next by Date:
**Re: Random bits (generation)**
Previous by thread:
**Re: FrameTick Problem**
Next by thread:
**Re: FrameTick Problem**
| |