log scale on axis

DataGraph Forums General Getting Started log scale on axis

Tagged: 

  • This topic has 3 replies, 2 voices, and was last updated 3 years ago by jake_b.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7473
    jake_b
    Participant

      How do I change the base for a logarithmic graph – e.g. I want to have the Y axis to base 10, and the X axis to base 2. Thanks –

      #7474
      jake_b
      Participant

        PS I have a second, related problem. I’m making 2 different graphs, and I’d like them to have the same range (1 – 0.000001) on the Y axis. I can set this OK on the axis menu, but I can’t get them to actually plot the data to the same scale – I am sure I am missing something basic here, apologies in advance

        #7475
        dgteam
        Moderator

          Hi Jake,

          For your second question, I think what you might be looking for is what we call a split axis.  Take a look here and let us know if that was it. Split X-Axis

          For the first question, DataGraph does not have a log2 axis built-in to the axis settings.   What you can do is to use the log2(x) function to scale the data and then specify where you want the tick marks. Depending on the range of your data the tick mark settings can be tricky to select but here is a simple example.

          (FYI – for a list functions see the Function reference).

          For this example, we will plot  y = log2(x).  In the first plot, x is still on a linear scale.

           

          one

          The second plot has the function plotted on the log2 scale, and is a straight line as a result.

          two

          To generate the data, we calculated some values using the Expression column.

          log2-1

          Then we created a group of columns to define where we wanted the label locations.

          log2-2

          Finally, the Axis settings get modified to use these label locations as follows:

          log2-3

          Does this help?

           

          #7476
          jake_b
          Participant

            Thanks v much –

            1. Yes, I think the split-graph option should work for getting the axis scales to match – I haven’t tried it out yet but it looks right.

            2. Thanks for the suggestion for getting an appropriate log scale – I have to admit, for my current problem, I don’t care that much! I will either just plot it on an axis using the ‘wrong’ base (as the graphs will look the same, except for the exact labels), or else plot a linear graph using the log2-transformed data. However, it is good to know for the future that the option is there to specify the exact positions, in case I ever really need to do that.

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.

          DataGraph Forums General Getting Started log scale on axis