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 graph properties using python

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
fly1342 Posted - 08/17/2022 : 02:58:10 AM
I have succeded in ploting graphs from the worksheet

SOC_110_graph = op.new_graph(lname='plus-SOC-110', template='scatter')
gl=SOC_110_graph[0]
plot = SOC_110_graph[0].add_plot(plus_charge_wks, coly=5, colx=3, type='scatter')
gl.rescale()


I want to modulize my graph by changing the graph properies below.
1. Scale
2. Line and Ticks
3. Grids
4. Color of graph

I've looked at the forum and also the basic guidline for python
But Can't find it.

Can anybody help me out please?


john
1   L A T E S T    R E P L I E S    (Newest First)
YimingChen Posted - 08/17/2022 : 09:38:54 AM
You can set graph element properties using set_int() or set_float() method. Some of the examples are:

gl.set_float('x.from', 1.5) 
gl.set_int('x.showgrids',1)
gl.set_int('plot1.color', 4)


You can refer to the webpage for those properties:
https://www.originlab.com/doc/LabTalk/ref/Layer-Axis-obj
https://www.originlab.com/doc/LabTalk/ref/Layer-Plotn-obj

James

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