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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Python
 how to change graph properties using python
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

fly1342

Korea
7 Posts

Posted - 08/17/2022 :  02:58:10 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

YimingChen

1618 Posts

Posted - 08/17/2022 :  09:38:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000