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
 All Forums
 Origin Forum for Programming
 Forum for Python
 How to change the "divide by factor"?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
ChemistryGuy Posted - 06/14/2022 : 4:50:30 PM
Origin Ver. and Service Release: 2022b
Operating System: Windows 11

I am writing a PyCharm script to to generate a graph with an axis that uses the "divide by factor" feature.

If I generate my graph using a template, I can ensure that the axis has a "divide by factor" in use. However, I do not know in advance what value for the "divide by factor" is suitable for my data set.

I can calculate a suitable value for the "divide by factor" within my PyCharm script, based on my data set. But the problem is that I could not find a way to change the value of the "divide by factor" in the Origin graph itself.

Please would you advise me if there is a way to programmatically alter this value?
2   L A T E S T    R E P L I E S    (Newest First)
ChemistryGuy Posted - 06/16/2022 : 02:11:06 AM
Thank you for this advice, I gave it a try and it worked perfectly!

And good to know there are additional functions available in LabTalk I will keep this in mind.
minimax Posted - 06/14/2022 : 10:42:06 PM
Hi,

I think there is no raw python interface now.

So you may use Labtalk instead, like

gp = op.find_graph()
gl = gp[0]
fac = 10
gl.lt_exec(f'layer.x1.label.divideby={fac}')


https://www.originlab.com/doc/LabTalk/ref/Layer-Axis-Label-obj

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000