Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
cts18488
Posted - 06/20/2022 : 4:30:56 PM Origin Ver. 2021b and Service Release (Select Help-->About Origin): SR2 Operating System: Windows 10 Enterprise
Hi,
Can you please tell me what is the code to add an axis label? Also, I want to include in the label a variable from python (please see the example below)
x = 100 The axis label in python: "the grid separation is x meters" and the following one to appear in Origin as an axis label: the grid separation is 100 meters.
Thank you, Tibi
4 L A T E S T R E P L I E S (Newest First)
cpyang
Posted - 06/24/2022 : 12:27:19 PM
quote:Originally posted by cts18488
Thank you!
And how can I make it bold? What would be the command?
Tibi
Bold etc are formatting escapes for any text labels on a graph, called Origin Rich Text, see
gl.axis('x').title = f'\\b(the grid separation is {val} meters)'
Double backslash is needed since Python is also using backslash for escape character.
CP
cts18488
Posted - 06/24/2022 : 12:10:33 PM Thank you!
And how can I make it bold? What would be the command?
Tibi
quote:Originally posted by cpyang
I assume axis label you mean axis title?
import originpro as op
graph = op.new_graph(template='line')
gl = graph[0]
val=10
gl.axis('x').title = f'the grid separation is {val} meters'
CP
cpyang
Posted - 06/20/2022 : 5:37:58 PM I assume axis label you mean axis title?
import originpro as op
graph = op.new_graph(template='line')
gl = graph[0]
val=10
gl.axis('x').title = f'the grid separation is {val} meters'
CP
cts18488
Posted - 06/20/2022 : 4:34:27 PM also, can you tell me how to specify which axis to use? X or Y axis.
quote:Originally posted by cts18488
Origin Ver. 2021b and Service Release (Select Help-->About Origin): SR2 Operating System: Windows 10 Enterprise
Hi,
Can you please tell me what is the code to add an axis label? Also, I want to include in the label a variable from python (please see the example below)
x = 100 The axis label in python: "the grid separation is x meters" and the following one to appear in Origin as an axis label: the grid separation is 100 meters.