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 font type & reverse the axis

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
WSY Posted - 01/01/2024 : 11:46:26 AM
Origin Ver.9.8.0.200:
Operating System:Win 10

Hello,
I have wrote a Python script to deal with my own data, but i need to change the font type in the whole graph, such as the X axis, Y axis and the title of the graph. Besides, how to reverse the axis, the problem has puzzled me a lot. Hope I can get a proper method to figure out.

Sincerely yours,
Sheng-Ye
3   L A T E S T    R E P L I E S    (Newest First)
minimax Posted - 01/03/2024 : 12:09:45 AM
If all your graphs requires a same font, you can set the theme file as System Theme on Theme Organizer dialog, so that you do not need to add codes to apply.

On the other hand, you may also save a graph template with the needed font, and then
op.new_graph(template='mytemplate') will create the graph with proper font.
WSY Posted - 01/02/2024 : 12:07:43 PM
Hi minimax,
Thanks for your help, I will have a try ASAP.

Best,
WSY
minimax Posted - 01/01/2024 : 10:31:59 PM
Hi WSY,

You may first set up a graph theme with the desirable font, and then apply it using LabTalk (X-Function themeApply2g) script.

I suppose there is no native Python function yet, like following:


import originpro as op
gp=op.find_graph()

gpname=gp.name
gp.lt_exec('themeApply2g theme:=myFontThemeFileName graphs:=f"{gpname}"')

# set X axis as reverse
gl=gp[0]
gl.set_int('x.reverse',1)


Sample theme file:
https://my.originlab.com/ftp/forum_and_kbase/Images/Fsegoe.zip

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