Log Plots

  • Thread starter Thread starter Javier Gomez
  • Start date Start date
J

Javier Gomez

Hi all,

Is there a way to change the labels on the axis of a logarithm scale plot so
it says 10 to the nth-power (i.e. 10^1, 10^2... and so on) instead of the
10, 100, 1000... that Excel uses by default.

Using Excel 2002 if that matters...

Thanks,

Javier
 
Javier,

Select the offending axis (click any label on it). Format - Selected axis -
Scale - Number.
 
Earl... thanks for responding.

First of all, I cannot find "Number" in the Scale tab that you mentioned. So
maybe I'm missing something.

Also, now... I realize my post was probably misleading. In the case you were
suggesting to change the number format to Scientific Notation... this is not
what I want. I want to get 10^3 (where ^3... is the 3 in superscript "font")
instead of 1.00E+03.

Thanks,

Javier
 
Javier said:
Is there a way to change the labels on the axis of a logarithm scale
plot so it says 10 to the nth-power (i.e. 10^1, 10^2... and so on)
instead of the 10, 100, 1000... that Excel uses by default.

Using Excel 2002 if that matters...

I've looked for that as well. I'm pretty sure it's not available directly
in Excel.

You might be able to trick it into doing what you wish using a dummy series
and Rob Bovey's chart labeler. I just tried it, and it will do 10^0, 10^1,
etc. But it will *not* do superscripts, so you would have to use the carat.
I guess you could use two dummy series, each with their own labels...

My description is pretty brief. If you want a few more details, let me
know.

Dave
dvt at psu dot edu
 
Hi,

Use a dummy series to mimic the axis.
If you link the datalabels to cells you will not be able to use
superscript. So you will have to set the text explicitly.
The routine below will create the text and format the power value to
superscript.


Sub MakeSuperScript()
Dim intIndex As Integer
Dim strPower As String

' Adjust SeriesCollection(2) so it uses your dummy series
With ActiveChart.SeriesCollection(2)
.HasDataLabels = True
.DataLabels.Position = xlLabelPositionBelow
For intIndex = 1 To .DataLabels.Count
strPower = CStr(intIndex - 1)
.DataLabels(intIndex).Text = "10" & strPower
.DataLabels(intIndex).Characters(3,
Len(strPower)).Font.Superscript = True
Next
End With
End Sub

Hope this helps
I've looked for that as well. I'm pretty sure it's not available directly
in Excel.

You might be able to trick it into doing what you wish using a dummy series
and Rob Bovey's chart labeler. I just tried it, and it will do 10^0, 10^1,
etc. But it will *not* do superscripts, so you would have to use the carat.
I guess you could use two dummy series, each with their own labels...

My description is pretty brief. If you want a few more details, let me
know.

Dave
dvt at psu dot edu

--

Cheers
Andy

http://www.andypope.info
 
Back
Top