Author |
Topic  |
|
jaceta
3 Posts |
Posted - 06/07/2018 : 11:58:12 AM
|
I would like to know how to plot in Origin 8 a logarithmic plot (x axis) but instead to use the decimal (0.01, 0.1, 1, 10,...) or scientific (10^-2, 10^-1, 10^0,...), I want to use the logarithmic notation -2,-1,0,1,2 and so on.
In axis --> type I choose the option log10, but I cannot find the way to show the logarithmic scale as -2,-1,0,1,2...
It is possible?
Thank you! |
|
YimingChen
1685 Posts |
Posted - 06/07/2018 : 12:23:13 PM
|
Hi Jaceta,
Double click on the x axis, switch to Tick Labels tab, under Display subtab, you just need to set the Formula to log(x).
See this FAQ about how to format axis tick labels https://www.originlab.com/doc/Quick-Help/Format-Axis-Tick-Labels
James OriginLab |
Edited by - YimingChen on 06/07/2018 12:23:50 PM |
 |
|
jaceta
3 Posts |
Posted - 06/07/2018 : 12:52:55 PM
|
it doesn't work.
I use Origin 8, I did double click on the x axis, and under Display subtab there is an square called Divided by, I wrote here log(x). This didn't work.
Should I modified the type of plot or other additional parameter?
I show you below what i have before applying the function log(x) and after.
Thanks!
quote: Originally posted by YimingChen
Hi Jaceta,
Double click on the x axis, switch to Tick Labels tab, under Display subtab, you just need to set the Formula to log(x).
James OriginLab
  |
 |
|
YimingChen
1685 Posts |
Posted - 06/07/2018 : 1:42:13 PM
|
Hi Jaceta,
The GUI is for Origin of newer version. You may want to try our latest version. Please go to this page to start demo download: https://www.originlab.com/demodownload.aspx
In Origin 8.0, you can still modify the tick labels, but with programming way. Please select from menu Window:Script Window. Then make sure your graph is active, copy paste the following script into the script window and hit Enter. Your tick labels should be updated.
layer.x.label.formula$=log(x)
Thank you, James |
 |
|
jaceta
3 Posts |
Posted - 06/08/2018 : 03:33:06 AM
|
It works! Thank you very much for your help!
quote: Originally posted by YimingChen
Hi Jaceta,
The GUI is for Origin of newer version. You may want to try our latest version. Please go to this page to start demo download: https://www.originlab.com/demodownload.aspx
In Origin 8.0, you can still modify the tick labels, but with programming way. Please select from menu Window:Script Window. Then make sure your graph is active, copy paste the following script into the script window and hit Enter. Your tick labels should be updated.
layer.x.label.formula$=log(x)
Thank you, James
|
 |
|
jacetapi
France
2 Posts |
Posted - 06/24/2021 : 10:10:51 AM
|
Hi, it's me again. I tried to show all axis labels in this plot in logarithmic scale as -2,1,0...The code layer1.x.label.formula$=log(x) worked correctly but when I tried layer1.y.label.formula$=log(y) and layer2.y.label.formula$=log(y) it did not work. In the case of the y axis in layer 1, the label disappears and I get what you see in the image. In the case of the y axis in layer 2, nothing happened when I applied the command. What am I doing bad? Thanks!
 |
 |
|
YimingChen
1685 Posts |
Posted - 06/24/2021 : 10:18:40 AM
|
Please use:
layer.y.label.formula$=log(x);
Note here that log(x) is the general formula with variable x, you don't change it to y.
James |
 |
|
jacetapi
France
2 Posts |
Posted - 06/24/2021 : 10:30:36 AM
|
Hi James, thank you. Now layer 1 is the way I wanted. But layer2.y.label.formula$=log(x) does not work. I also tried layer2.RightY.label.formula$=log(x) and gave me an error. How can I change layer 2? Thanks |
 |
|
YimingChen
1685 Posts |
Posted - 06/24/2021 : 4:29:06 PM
|
Try this for the right Y axis in the second layer.
layer2.y2.label.formula$=log(x);
|
 |
|
|
Topic  |
|
|
|