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
 Using a Column as Error Bars for Data

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
edu404 Posted - 06/11/2024 : 12:14:58 PM
Origin Ver: 2024 Academic Operating System: Windows 10

Hi everyone,

I'm currently working on a project where I need to plot data points from a TXT file. I would like to use a specific column as error bars for my data points. However, I'm having trouble figuring out how to achieve this using the Origin Pro Python library.

Could someone guide me on the correct approach to use the column as error bars for my data points in Origin Pro using Python?

Thank you in advance for your help!

Edu
3   L A T E S T    R E P L I E S    (Newest First)
ChaoC Posted - 06/12/2024 : 09:17:20 AM
Hello,

Please refer to the documentation:
https://docs.originlab.com/originpro/classoriginpro_1_1graph_1_1GLayer.html#a9d5148e776444f3723ee126d1781b151

Best,
Chao
edu404 Posted - 06/12/2024 : 08:21:10 AM
When i open the opju file i see in the worksheet the error bar, however how i can plot this error bar using the add_plot, for example, i use coly for Y-axis, colx for X-axis and i dont know how to get the errorbar calling.


Example of my code:


for col in range(1, wks.cols):
wks.cols_axis('nnnxye')
plot = gp[0].add_plot(wks, coly='Rat_first', colx='Period [s]', cole='Rat_first.1', type = 202)
plot.color = colors[col % len(colors)]
plot.set_int('line.width', 2)
plot.set_int('lineStyle', 1)
plot.set_int('lineThickness', 1)
gp[0].rescale()

Edu
ChaoC Posted - 06/11/2024 : 4:40:08 PM
Hello,

You can use cols_axis():
https://docs.originlab.com/originpro/classoriginpro_1_1worksheet_1_1WSheet.html#ae9a1df2c0ac08ea40a8826af4e2207c6

E.g.

wks.cols_axis('xyme')

Col 1 is X
Col 2 is Y
Col 3 is x-Error
Col 4 is y-Error

Other column designation letters:

'z' = Z
'L' = Label
'g' = Group
's' = Subject
'n' = Disregard

https://www.originlab.com/doc/Origin-Help/WksCol-SetDesignation

Best,
Chao

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