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
 Error bar

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
korhorlefor Posted - 02/10/2021 : 03:41:15 AM
Hello everybody,

does everyone know how to create error bar plots with Python?


Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2021
Operating System: Windows 10
1   L A T E S T    R E P L I E S    (Newest First)
Chris D Posted - 02/10/2021 : 09:34:30 AM
Yes, not so obvious- it took me a minute.


import originpro as op

# Set up data
book = op.new_book('w')
wks = book[0]
wks.from_list(0, [1,2,3,4,5], axis='X')
wks.from_list(1, [1,2,3,4,5], axis='Y')
wks.from_list(2, [0.15,0.12,0.13,0.10,0.14], axis='E')

#Create graph and get 1st layer
graph = op.new_graph()
lay = graph[0]

# Add a scatter plot
# For `type` see: https://www.originlab.com/doc/LabTalk/ref/Plot-Type-IDs
lay.add_plot(obj=wks, coly=1, colx=0, type=201)

# Now, a bit of trickery.
# You have to add the same plot again, but use the error column as `colz`
lay.add_plot(obj=wks, coly=1, colx=0, colz=2, type=201)

lay.rescale()



Thanks,
Chris Drozdowski
Originlab Technical Support

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