View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.charting
Newsx Newsx is offline
external usenet poster
 
Posts: 6
Default Excel 2007, log chart issue


Thanks Jon, I also did some fiddling with it and found it got weirder
and weirder. Almost as weird as how I misconfigured my news reader to
lose this thread, hence the delay reposting :-(

I create a series of X-Y points where X went from 1 to about 20 and Y
went 1,10,100,1000,10000, 100,100,10,1,10,100 etc

Then I plotted the data on a chart. A nice series of bumps appeared, as
expected. When I changed the Y axis to be logarithmic I got the warning
message again, despite there being no cells at all with anything other
than perfectly valid data.

It seems to me that MS just put a warning message in to make sure
everybody knows (as if they didn't already) that you can't put negatives
on a log scale. It's a shame they didn't seem to provide a way to tell
it that I already knew that :-(

I've been trying to work this in Excel 2007 SP1.

In message , Jon Peltier
writes
I just played around a bit. Blank cells do not kick off this issue, they are
ignored. Negative cells, zeros, and cells containing text raise the warning,
but only once per chart. Your "blank" cell is probably a formula that
returns "", which is text. What I found more unsettling than this message is
that text cells and zeros are plotted as a marker with a value equal to the
log axis minimum; however, a quick check shows that this display of text and
zero at the log axis minimum been corrected in Excel 2007 SP1.

DisplayBlanksAs only affects truly blank cells, not "".

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______



"Newsx" wrote in message
...

I'm trying to put together a piece of code in Excel, to be called by an
external application to regenerate graphs.

The offending code is this:

ActiveChart.PlotVisibleOnly = True
ActiveChart.DisplayBlanksAs = xlNotPlotted
ActiveChart.Axes(xlValue).ScaleType = xlLogarithmic


The process fails when trying to set the scaletype to logarithmic,
claiming that negative or zero values cannot be plotted.

There are no negative or zero values in the data series but there are a
number of blank cells. This works perfectly in Excel 2003 but Excel 2007
throws errors.

This is really doing my head in, so any pointers would be much
appreciated!


--
Confidence is what you have when you don't understand the situation




--
Confidence is what you have when you don't understand the situation