Re: Zero values cause errors on log scale
From: Martin Brown (|||newspam|||_at_nezumi.demon.co.uk)
Date: 07/14/04
- Next message: Jerry W. Lewis: "Re: Zero values cause errors on log scale"
- Previous message: Jamie Collins: "Re: Novice Question"
- In reply to: Jerry W. Lewis: "Re: Zero values cause errors on log scale"
- Next in thread: Jerry W. Lewis: "Re: Zero values cause errors on log scale"
- Reply: Jerry W. Lewis: "Re: Zero values cause errors on log scale"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 14 Jul 2004 13:31:46 +0100
In message <40F48AD0.4040806@no_e-mail.com>, Jerry W. Lewis
<post_a_reply@no_e-mail.com> writes
> log(0) = -infinity
>
>If these zero values are "real" then a log scale is not appropriate,
>and the warning is telling you something important.
That isn't necessarily true though. A lot of scientific data for example
ion counting systems can include 0 counts, 1 count and a dynamic range
of up to 10^9. A logarithmic scale is the only way to sensibly display
the resulting huge range of faint signals and very high peaks.
> If these zero values are unfortunate place holders for "unknown",
>"na", etc., then instead of plotting the data as received from SQL,
>plot an intermediate formula like
> =IF(obs=0,#N/A,obs)
The log(0) issue is largely irrelevant for many graph display purposes.
Defining (incorrectly) Log(0) = 0 is often good enough as a work around.
The Excel error message is infuriating because it cannot be disabled on
a per plot basis.
The simplest way round this mess is to select the raw data range and
execute a search and replace to put empty cells in place of all
precisely zero values. This is much the fastest way for large arrays of
raw data.
Log(empty_cell) is curiously not an error
Or in this particular case tweak the SQL code to export a different
representation of zero (e.g. empty_cell) that does not generate the
error message.
>Scott Doyle wrote:
>
>> I deal with a lot of plots with "real" data from an SQL database,
>>and must plot with log scales. The "real" data includes 0 values.
>>Is there a way to turn off the repeated, and annoying, warning
>>"Negative or zero values cnnot be plotted on log charts"? Resizing
>>windows is painful with a plot on screen when this message pops up
>>evry time I start to drag the cursor a few pixels.
>
I find it a bit odd that Excel in Office XP doesn't give the same log(0)
error message the first time that you switch a graph containing negative
or zero values into log mode.
Regards,
-- Martin Brown
- Next message: Jerry W. Lewis: "Re: Zero values cause errors on log scale"
- Previous message: Jamie Collins: "Re: Novice Question"
- In reply to: Jerry W. Lewis: "Re: Zero values cause errors on log scale"
- Next in thread: Jerry W. Lewis: "Re: Zero values cause errors on log scale"
- Reply: Jerry W. Lewis: "Re: Zero values cause errors on log scale"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|