The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 logarithmic scale as -2,-1,0, 1, ...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jaceta

3 Posts

Posted - 06/07/2018 :  11:58:12 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

jaceta

3 Posts

Posted - 06/07/2018 :  12:52:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Go to Top of Page

YimingChen

1685 Posts

Posted - 06/07/2018 :  1:42:13 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

jaceta

3 Posts

Posted - 06/08/2018 :  03:33:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Go to Top of Page

jacetapi

France
2 Posts

Posted - 06/24/2021 :  10:10:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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!

Go to Top of Page

YimingChen

1685 Posts

Posted - 06/24/2021 :  10:18:40 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

jacetapi

France
2 Posts

Posted - 06/24/2021 :  10:30:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

YimingChen

1685 Posts

Posted - 06/24/2021 :  4:29:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Try this for the right Y axis in the second layer.
layer2.y2.label.formula$=log(x);
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000