Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: Formatting numbers on Plot axis

  • To: mathgroup at
  • Subject: [mg30176] Re: [mg30143] Formatting numbers on Plot axis
  • From: Omega Consulting <omega_consulting at>
  • Date: Wed, 1 Aug 2001 02:19:37 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

At 03:27 AM 7/31/2001, Oliver Friedrich wrote:
>I'm plotting a function with the Plot Command. The range is from -200*10^3
>to 200*10^3. That's also exact the way I told it the system.
>How can I tell Mathematica not to display 100000 and 200000 on the x-axis
>ticks, but rather 200*10^3 or something like 200k . What are the options or
>directives to tell Mathematica to format the x-axis numbers in a special
>BTW: I'm running version 3.0
>Thanks a lot
>Oliver Friedrich

The Ticks option (a very complicated beast) will do what you want.

f[min_, max_] :=
     Table[{x, ToString[Round@x/10^3] <> "k"}, {x, min, max, (max - min)/6}]

Plot[x/10^3, {x, -200*10^3, 200*10^3}, Ticks -> {f, Automatic}]

  • Prev by Date: Re: Sum
  • Next by Date: Re: Formatting numbers on Plot axis
  • Previous by thread: Re: Sum
  • Next by thread: Re: Formatting numbers on Plot axis