+ Reply to Thread
Results 1 to 12 of 12

Log x axis help please

  1. #1
    Registered User
    Join Date
    12-29-2006
    Posts
    18

    Log x axis help please

    Hi,

    I have a data
    x values are 0,0.00125,0.0025,0.005,0.01,0.0625,0.125,0.25,0.5,1

    and corresponding y values


    100,36.04363183,39.50750344,38.44265851,33.42891946,33.48619236,45.09,41.32368779,41.4299366,40.73028774

    If I want to chart them making my x axis in log scale in XY plot, the y value for x value of '0' doesnot seem to come up.

    I understand the x log value should be more than 0.

    How to make x values log in my case please. I would like to keep 0 as well as my first x value as it is control value for me.

    Thanks

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Take a look at Flexible Log scale ...
    http://www.tushar-mehta.com/excel/ne...elp/index.html
    HTH
    Carim


    Top Excel Links

  3. #3
    Registered User
    Join Date
    12-29-2006
    Posts
    18
    Thanks for the reply.
    But the example is for only y axis.
    I would like to convert x axis into log scale and my first value is x=0

    So I don't know how to go.


    Sincerely

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Make sure your chart type is XY Scatter, not Line. In a scatter chart,
    the X axis is a continuous number line, and you can scale it
    logarithmically.

  5. #5
    Registered User
    Join Date
    12-29-2006
    Posts
    18
    Thanks.
    Yes I have done it in XY graph.
    See my first value on x axis is 0 followed by x=0.000625 and ..... the values given above.


    When I convert X AXIS TO LOG scale I donot get the point (x,y)= (0,100)

    I think there is no LOG 0?

    Thanks

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829
    Log(0) is undefined, that's why it (0,100) can't be plotted. You will have to "defiine" log(0) for you application.

    I'm not sure what you're trying to show with your plot, but you could use some arbitrary number smaller than the smallest x value. For example, instead of plotting (0,100), plot (1E-4,100). Then, if you apply a number format of 0.000 to the axis, the 1E-4 point will appear at 0.000. If you will, in this case you are simply "defining" log(0) to be log(a) where a is the smallest number that is meaningful to your application.

    Tushar's flexible log axis tutorial applies to the x-axis as well, just replace references to the y-axis with x-axis. It's still the same principle. But, even using the flexible log axis, you still have to decide exactly what to do with the (0,100) point.

  7. #7
    Registered User
    Join Date
    12-29-2006
    Posts
    18
    Mr Shorty,

    Thank you very much. That is great and I used your method.
    However I will try Tushar web later. You saved my enormous amount of time.



    Thanks

    Irr

  8. #8
    Registered User
    Join Date
    12-29-2006
    Posts
    18

    Question trend line

    Hi, I plotted my data as suggested my Mr Shorty. Great
    However I am not able to fit a trend value.
    The fact that i have converted my x values into log, does it affect the trendlines??

    Please help me

  9. #9
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829
    Now you've introduced curve fitting into the problem. Excel can still calculate a trendline based on a log-x axis, so it isn't a problem with Excel.

    Introducing curve fitting to the problem means you have to be very careful about changing a data point like I suggested. You can get very different trendlines depending on what you choose to substitute in for x=0.

    The first step in any curve fitting problem is to determine what form you want for the function that will best represent the underlying real world process. Not knowing what the data represent, the only "trend" I see is y~40 (ignoring the (0,100) point).

    What form of equation do you want? If you don't know the form, what properties do you want the equation to have?

  10. #10
    Registered User
    Join Date
    12-29-2006
    Posts
    18
    Thanks Mr Shorty,

    I got your point. The data I have is dose response curve of drug concentrations in the x axis and response in terms of survival of cells. It is bit bizzare but it is a fact that the drug I am testing behaves in a various way. At the intital concentration of the drug in x value it kills lots of cells and then it kind of stabilises and then goes down again


    To show equal distance of the x values I converted the x into log graph and tried to fit a trend line to find an equation. I guess a polynomial equation should work, but some how it is not giving a reasonable r value.

    Could you help please.

    have a data
    x values are 0,0.00125,0.0025,0.005,0.01,0.0625,0.125,0.25,0.5, 1

    and corresponding y values


    100,36.04363183,39.50750344,38.44265851,33.4289194 6,33.48619236,45.09,41.32368779,41.4299366,40.7302 8774

    I have created the x axis by taking x=0=1E-5


    Thanks for your time
    Last edited by irr; 01-24-2007 at 05:28 PM.

  11. #11
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829
    That is a tough one. Off the top of my head, I don't see an obvious function that yields that kind of behavior. I'm sure you could get a high order polynomial to "fit" the data, but I would be real careful what such an equation would do in between the data points. The closest thing I came up with quickly was a decaying oscillation type equation (y=A^x*sin(x)) where A is less than 1.

    Are you up to splitting the data set into 2 or 3 sections? Looking at the data on a linear axis, the data above 0.125 look like they could be fit by an exponential decay type model (A+B^-x) or an inverse function (A+Bx^-1). I don't know that these equation forms are readily represented by the forms available for chart trendlines. I would suggest you research (here and elsewhere) how to use the LINEST function to curve fit. You have much more flexibility in equation form (essentially anything that can be expressed in the form g(y)=a1*f1(x)+a2*f2(x)+a3*f3(x)...).

    For ultimate flexibility, you can use Solver to get a best fit.

    You could then try a cubic or quartic to fit the lower data. It also might be useful to "fix" the y intercept at 100.

    Good luck and let us know how it goes and how we can help.

  12. #12
    Registered User
    Join Date
    12-29-2006
    Posts
    18
    Thanks Mr shorty.

    I will try and let you know anything comes out of it. Since I am not statitician I might need some time to fix this.

    Thanks for your valuable time.

    sincerely
    Irr

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1