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 right Y axis title
Note:
Only the poster of this message, and the Moderator can edit the message.
Screensize:
640 x 480
800 x 600
1024 x 768
1280 x 1024
UserName:
Password:
Anti-Spam Code:
Format Mode:
Basic
Help
Prompt
Format:
Font
Andale Mono
Arial
Arial Black
Book Antiqua
Century Gothic
Comic Sans MS
Courier New
Georgia
Impact
Lucida Console
Script MT Bold
Stencil
Tahoma
Times New Roman
Trebuchet MS
Verdana
Size
1
2
3
4
5
6
Color
Black
Red
Yellow
Pink
Green
Orange
Purple
Blue
Beige
Brown
Teal
Navy
Maroon
LimeGreen
Forum:
Forum for Python
Subject:
Message:
* HTML is OFF
*
Forum Code
is ON
Smilies
Origin Ver. and Service Release (Select Help-->About Origin):2024b Operating System: Win10 Hello, I'm creating an automation tool in Python to generate graphs in OriginLab. I've successfully added a right Y-axis and specified its range. However, I'm unsure how to modify the axis title for this right Y-axis. ======================= import originpro as op import numpy as np op.set_show(True) book = op.new_book('w', 'MyBook') wks = book.add_sheet('SPACE') x = np.linspace(0, 10, 100) y1 = np.sin(x) y2 = np.cos(x) + 1 wks.from_list(0, x, 'Time') wks.from_list(1, y1, 'Sin(x)') wks.from_list(2, y2, 'Cos(x)') graph = op.new_graph() layer1 = graph[0] plot1 = layer1.add_plot(wks, coly=1, colx=0) plot1.color = (255, 0, 0) plot1.name = 'Sine Curve' layer1.lt_exec(f'set {plot1.name} -w 2000') layer2 = graph.add_layer(2) # 2: right Y linked X scale plot2 = layer2.add_plot(wks, coly=2, colx=0) plot2.color = (0, 0, 255) plot2.name = 'Cosine Curve' layer2.lt_exec(f'set {plot2.name} -d 2') layer2.lt_exec(f'set {plot2.name} -w 1000') layer1.rescale() layer2.rescale() layer1.axis('x').title = 'Transient Time, sec.' layer1.axis('x').limits = (0, 10, 1) layer1.axis('y').title = 'Left value' layer1.axis('y').limits = (-1.0, 1.0, 0.2) layer2.axis('y').limits = (0, 2.0, 0.2) layer2.axis('y').title = 'Right value'
Check here to subscribe to this topic.
The Origin Forum
© 2020 Originlab Corporation
Snitz Forums 2000