Re: Decimal point in printed numbers
- To: mathgroup at smc.vnet.net
- Subject: [mg41584] Re: Decimal point in printed numbers
- From: bobhanlon at aol.com (Bob Hanlon)
- Date: Wed, 28 May 2003 04:57:20 -0400 (EDT)
- References: <bavarn$28s$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Use a Rule ticklist /. x_Rational :> N[x] Bob Hanlon In article <bavarn$28s$1 at smc.vnet.net>, Jan Rychter <jan at rychter.com> wrote: << Subject: Decimal point in printed numbers From: Jan Rychter <jan at rychter.com> To: mathgroup at smc.vnet.net Date: Tue, 27 May 2003 09:24:07 +0000 (UTC) I'm generating labels for axes in a plot. If I numericalize (N[]) them, I get a decimal point after each number, even if there is no fractional part. If I don't I risk getting rationals (1/2). What is the preferred solution? I guess I could either convert everything to reals (using N[]) and change the printed representation (but I couldn't find out how to get rid of the decimal point reading the manuals), or try to stick with precise numbers and only convert if fractions result. Is there a way to do that? --J. >><BR><BR>