A question that comes up frequently is why Origin may not plot or fit a dose value of 0 (zero) for dose response curves (and those that are similar). It usually boils down to the following simple mathematical reality that is easily overlooked:
The logarithm of 0 is undefined!
In this post, I will present and discuss the two most common scenarios where this may occur in order to provide a better understanding of issue. Scenario 1 assumes that linear Dose data is plotted with the axis scale type set to Log10. Scenario 2 assumes that the Dose data is transformed to logarithmic in the actual workbook and the axis scale type in the plot is set to Linear. You can download a zipped Origin project file if you’d like to see for yourself what I am discussing in this post.
In Figure 1a you can see a dose response dataset and a plot of that data in Figure 1b. In the graph, the axis Scale Type for the Dose data (which is the X axis) has been set to Log10 so that the plot can assume the characteristic sigmoidal shape expected for dose response curves (a semi-log plot).
Notice that in the dataset the first Dose value is 0. In the graph, the datapoint for that Dose value isn’t plotted. Why? Well, when changing the axis Scale Type to Log10, Origin internally transforms the plot data to Log10 (it doesn’t touch the original dataset). And because the logarithm of 0 is undefined, Origin cannot plot that datapoint. Where would it put a point whose X value is undefined?
Now let’s suppose that we want to fit the plotted data. The first thing to understand is that Origins Nonlinear Fitter uses the original source dataset for the fitting. It does not use the data in the plot that has been transformed to Log10 on the graph.
When we use the Logistic fitting function (a 4PL function), we observe something in Figure 2a that may seem odd but is quite logical: the fitted curve plot stops at 1E-7 which is the 2nd datapoint in the original dataset. Why? Again, Origin cannot plot the Log10 value of 0. Therefore it can’t automatically know where to extend the fitted curve to. That being said, because Origin uses the original source dataset in the fitting, it can be seen in Figure 2b that Origin does in fact fit all 9 Dose values in the dataset regardless of where the fitted curve plot stops on the graph.
The conclusion is that Origin is operating correctly in this scenario. However, if you really want to display the 0 dose on the plot, my colleague Hideo Fujii offers a solution outlined in the Hideos Solution section at the end of this post.
In this scenario, the Dose data in the dataset is transformed to Log10 in the column itself (see Figure 3a). This is accomplished by adding the following code to the F(X)= column label row:
log(col(A)). Notice that the transformed value for Dose 0 now is “- -” (called a missing value). Remembering that the logarithm of 0 is undefined, it is clear that Origin cannot generate a Log10 value for that Dose.
When plotting this data, the axis Scale Type for the Dose data (the X axis) doesn’t need to be changed to Log10 because the original data has already been transformed. It can be seen in Figure 3b that the plot is already in the expected sigmoidal shape. Just like in Scenario 1, something may seem odd: the data point for the transformed 0 Dose isn’t plotted. And just like in Scenario 1, it can’t be plotted. Where would Origin put a point whose X value is undefined (the missing value)?
When the data is fit using the DoseResp fitting function (a 4PL function designed to fit source data with logarithmic X values) in Figure 5a, the fitted curve plot stops right where it should- at the first point actually plotted on the graph.
In a departure from Scenario 1, it can been seen in Figure 5b that the fit itself does not take into account the data point with the missing value (- -) for Dose (the point whose non-logarithmic value is 0). It simply cannot fit an undefined X value.
Again, the conclusion is that Origin is operating correctly. However, there are a couple of options to overcome this issue.
The first is to change the 0 Dose value (which is “- -” in the log-transformed workbook) to an extremely small number close to 0 (much smaller than the lowest non-zero dose). Maybe a value that is 1000 times (3 log units) smaller than the lowest non-zero Dose would be good enough. This allows the dose to be plotted and included in the DoseResp fit. OriginLab is not telling or encouraging you to do this as only you can decide how to handle your data. However, this same solution is offered by other software besides Origin.1 If this isn’t an acceptable solution for you, read on.
Perhaps the better option for 0 Dose data is to avoid transforming the Dose data to Log10 in the workbook. Rather, use linear Dose data and fit it with the Logistic fitting function instead of the DoseResp fitting function. Then adopt Hideos Solution discussed below. Hopefully, this will provide an acceptable solution for you. Note: if you need to transform Log10 data in the workbook back to linear, use the F(X)= formula:
10^col(A) and then manually change the first Dose value to 0.
My Colleague Hideo Fujii offers the following solution to plot both the 0 Dose datapoint and allow the fitted curve to extend all the way to that point. It involves utilizing an Axis Break to allow two different axis scale types to be used for the Dose data. The following steps and figures will explain the process:
Create a scatter plot of the linear Dose dataset (not illustrated).
Step 2 (Figure 5a)
Double-click on the X axis line to open the Axis Dialog and navigate to the Scale tab for the Horizontal axis.
- Set the From value to -0.1 and the To value to 6E-4 (or an appropriate value for other data).
- Set Type to Linear. This is the first axis scale type. Linear allows the point at 0 to be displayed.
- Set the Major Ticks Type to By Counts 、 Count to 1.
- Set Minor Ticks Count to 0.
Step 3 (Figure 5b)
Navigate to the Tick Labels tab.
- Set Type to Numeric, Display to Custom, and Custom Format to .0 indicating tick labels should have no decimal places.
Step 4 (Figure 6a)
Navigate to the Breaks tab.
- Set Break Half Length to 0 、 Number of Breaks to 1.
- Select the break in the grid and click on the Details… button.
Step 5 (Figure 6b)
In the Breaks Details dialog, navigate to the Scale After Break tab.
- Set both Break From 、 Break To to 1.1E-8. By setting both to the same value, no gap will appear on the axis line.
- Set Position (% of Axis Length) to 2.
- Set Scale Type to Log10. This is the second axis scale type. This allows the rest of the axis to be Log10.
- Set the Major Ticks Type to By Increment 、 Value to 1.
- Set Minor Ticks Type to By Counts 、 Count to 8.
Note: For other datasets, it may be necessary to adjust the Break From and To values as well as the Position value. The idea is to adjust settings so that the tick labels and axis are positioned in a presentable manner. Getting the correct settings may require some patient experimentation and fine-tuning on your part. Adjusting these settings do not change the result of the fit, just the presentation.
Step 6 (Figure 6c)
In the Breaks Details dialog, navigate to the Tick Label After Break tab.
- Uncheck Auto.
- Set Bottom Type to Numeric 、 Display to Scientific: 10^3.
- Click OK button to close the dialog.
Click OK button in Axis Dialog to apply the changes to the axis.
Step 8 (Figure 7)
Double-click on the white area of the graph to open the Plot Details dialog.
- Select Graph3 graph page node on the navigation control on left of the dialog.
- Navigate to the Display tab.
- Check Connect line across Axis Break.
- Click the OK button to apply changes to the graph.
It can be seen in Figure 8 that the 0 Dose datapoint has been plotted on the graph and the fitted curve extends all the way to that point. Issue resolved!
1. GraphPad also offers this workaround. See http://graphpad.com/support/faqid/1063/