Jump to content
Software FX Community

Re: Logarithmic curve


Software FX

Recommended Posts

There are no X-Values in this chart. You are setting the X-Values as labels,

so your X-Axis is going from 1 to 14 (number of points). Labels have no

value.

If you want these X-value to be used as numeric values, you must pass them

as numbers not as strings.

Here is an example:

Dim x(14) As Double, y(14) As Double

Dim xAxis, yAxis As Variant

x(0) = 0.063

x(1) = 0.09

x(2) = 0.125

x(3) = 0.18

x(4) = 0.25

x(5) = 0.355

x(6) = 0.5

x(7) = 0.71

x(8) = 1#

x(9) = 2#

x(10) = 2.8

x(11) = 4#

x(12) = 6#

x(13) = 8#

y(0) = 6.91657866948258

y(1) = 11.1404435058078

y(2) = 17.3178458289335

y(3) = 27.9831045406547

y(4) = 40.8130939809926

y(5) = 55.596620908131

y(6) = 69.5881731784583

y(7) = 79.7782470960929

y(8) = 85.6388595564942

y(9) = 93.3474128827878

y(10) = 96.3569165786695

y(11) = 98.3104540654699

y(12) = 100

y(13) = 100

Set xAxis = Chart1.Axis(AXIS_X)

Set yAxis = Chart1.Axis(AXIS_Y)

Chart1.OpenDataEx COD_VALUES, 1, 14

Chart1.OpenDataEx COD_XVALUES, 1, 14

For j = 0 To 13

Chart1.ValueEx(0, j) = y(j)

Chart1.XValueEx(0, j) = x(j)

Next j

Chart1.CloseData COD_XVALUES

Chart1.CloseData COD_VALUES

xAxis.LogBase = 10

xAxis.Min = 0.01

xAxis.Step = 0.01

xAxis.Decimals = 2

--

Frank

SFX

"Per Skjondal" <skjoenda@online.no> wrote in message

news:5vLe7uRKAHA.2224@sfxserver.softwarefx.com...

> I've tried this before without any change.

>

> Here is the code I'm using within Access:

>

> Private Sub FillChart()

> Dim x(14) As String, y(14) As Double

> Dim xAxis, yAxis As Variant

>

> x(0) = "0,063"

> x(1) = "0,090"

> x(2) = "0,125"

> x(3) = "0,180"

> x(4) = "0,250"

> x(5) = "0,355"

> x(6) = "0,500"

> x(7) = "0,710"

> x(8) = "1,0"

> x(9) = "2,0"

> x(10) = "2,8"

> x(11) = "4,0"

> x(12) = "6,0"

> x(13) = "8,0"

>

> y(0) = 6.91657866948258

> y(1) = 11.1404435058078

> y(2) = 17.3178458289335

> y(3) = 27.9831045406547

> y(4) = 40.8130939809926

> y(5) = 55.596620908131

> y(6) = 69.5881731784583

> y(7) = 79.7782470960929

> y(8) = 85.6388595564942

> y(9) = 93.3474128827878

> y(10) = 96.3569165786695

> y(11) = 98.3104540654699

> y(12) = 100

> y(13) = 100

>

> Set xAxis = Chart1.Axis(AXIS_X)

> Set yAxis = Chart1.Axis(AXIS_Y)

>

> Chart1.OpenDataEx COD_VALUES, 1, 14

> For j = 0 To 13

> Chart1.ValueEx(0, j) = y(j)

> xAxis.Label(j) = x(j)

> Next j

> Chart1.CloseData COD_VALUES

> xAxis.LogBase = 10

> xAxis.Min = 0.01

> xAxis.Step = 0.01

> End Sub

>

> And the final curve is as shown: What is the problem. I want to show the x

> axis from 0.01 to 100.

>

> Per

>

>

>

>

>

> "Per Skjondal" <skjoenda@online.no> skrev i melding

> news:NXBxpJFKAHA.1432@sfxserver.softwarefx.com...

> > Hi, I have a huge problem. I've been trying for days now to produce a

> > logarithmic curve like in the file logCurve.jpg, but I have not

succeeded.

> > All I'm getting is as shown in myLogCurve.jpg. I want to display the

curve

> > like a proper logarithmic curve. Can somone please give me a good

> > instruction on how to do this, if it is possible?

> >

> > Regards

> >

> > Per Skjondal

> >

> >

> >

>

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...