MathGroup Archive 1996

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

Search the Archive

Re: tick labels in 2-D plots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg5108] Re: tick labels in 2-D plots
  • From: "David B. Wagner" <dbwagner at princon.com>
  • Date: Wed, 30 Oct 1996 22:04:06 -0500
  • Organization: Principia Consulting
  • Sender: owner-wri-mathgroup at wolfram.com

Carl W. Swartz wrote:
> 
> Is there a way in general to get fewer labeled tick
> marks?  I want to avoid having to use
> 
>         Ticks -> {..........},
> 
> --
> --------------------------------------------
> Bill Swartz
> University of New Mexico
> E-mail: swartz at eece.unm.edu

It is an undocumented feature in version 2.2 that a tick specification
passed to Ticks can be a function of two arguments that returns a
valid tick specification (e.g., a list).  The two arguments are
the min and max values on the axis.  Thus, you can use something
like

    Ticks->{Function[{x0,x1}, Range[x0, x1, (x1-x0)/5],
            Function[{y0,y1}, Range[y0, y1, (y1-y0)/7]}

to get, in this example, 6 evenly-spaced tickmarks on the x-axis
and 8 evenly-spaced tickmarks on the y-axis.  (Choose your own numbers.)
The advantage to this approach is that you can set this to be the
default Ticks option using

    SetOptions[Plot, Ticks->etc]

and it will adapt to each plot.



  • Prev by Date: Re: Mathematica Programming for Combinatorial Problems
  • Next by Date: Re: [Q] How to read (and analyze) .WAV files?
  • Previous by thread: tick labels in 2-D plots
  • Next by thread: TrueType TeX fonts