MathGroup Archive 2000

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

Search the Archive

Re: 2D..Ticks...


Ticks are discussed at length in the book Mathematica Graphics by Tom
Wickham-Jones,
ISBN-0-387-94047-2.

Here is a way of modifying:

Make a graphic

gr = Plot[Sin[x], {x, 0, 2Pi}];

Find the option for the ticks that are shown:

tks = AbsoluteOptions[gr, Ticks];


Take a look at the form of tks

Short[tks, 5]

{Ticks -> {{{0.,
          0., {0.00625, 0.}, {GrayLevel[0.],
            AbsoluteThickness[
              0.25]}}, \[LeftSkeleton]31\[RightSkeleton], {6.4,
          "", {0.00375, 0.}, {GrayLevel[0.],
            AbsoluteThickness[0.125]}}},
{\[LeftSkeleton]1\[RightSkeleton]}}}

Modify tks

tks2 = tks /. {t_Real, l_, {p_Real, n_Real}, stl_List} ->
        {t, l, {30p, n}, {Hue[0], AbsoluteThickness[.25]}};

Use tks2 with Show.

Show[gr, tks2[[1]]]

Unfortunatetely it looks as if the positioning of the labels uses the length
of the positive side of the ticks - I haven't sorted this out.

Of course you could specify your own ticks independently of the default
values given by Plot.
Please look up Ticks in the HelpBrowser.


Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"H.P.V. Vithana" <vidura at ait.ac.th> wrote in message
news:8lt1fh$2jk at smc.vnet.net...
>
> Dear Friends,
>
> Can anyone kindly advise me how to modify the tick length, and thickness
> on both axes..? I am a beginner and I tried to find the way from the
> manual..I have failed so far...
>
> I want to include it in....
>
> Show [... ]
>
> best regards,
> Vithana
>
> *********************************************************************
> H.P.V.Vithana
> Research Associate,
> WEM/SCE,
> Asian Institute of Technology,
> P.O.Box 4,
> Klong Luang 12120,
> Pathumthni,
> Thailand.
>
> email: vidura at ait.ac.th
> fax: 66-2-524-5558
> phone: 66-2-524-6067
> ********************************************************************
>
>




  • Prev by Date: Re: Help on Partitions, Again!!!
  • Next by Date: Re: Help on Partitions, Again!!!
  • Previous by thread: 2D..Ticks...
  • Next by thread: Plotting (x,y,z) Data