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 Origin C
 Exchanging X-Data in Graph

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
siggi4 Posted - 01/21/2021 : 12:54:01 PM
Dear Origin-Forum,

i hope you can help me with the following problem:

The Situation:
I have a large set of data, that I organized into worksheets. Every worksheet has several x-columns and y-columns (lets simplify: X1 X2 Y Y Y). Each set of y-columns (Y Y Y) is scientifically linked to each x-column (e.g. X1). To get an overview i plottet every worksheet so that i have a graph that shows (X1 YYY) in one layer.

My Wish:
I would like to be able to exchange the x-Data in the graphs (which leads to a more accurate picture)(eg. exchange X1 so that the graph shows X2 YYY). This can be done via the UI (Graph --> Diagram Setup --> choose other x and propagate the changes into the same graph).
Since I got 500 graphs that I want to apply the change to I need some quicker way to do this than the UI. Thats why I came to OriginC as a possible solution. Only that I don't seem to find the correct documentation to solve my problem.

What I get from the documentation I found (https://www.originlab.com/doc/OriginC/guide/Graphs and the links there) is that I probably need to work with dr.add()-Funktion. For the beginning a simple proof of concept would be nice. My logical steps would be:
1. Choose a graph window that needs changing
2. Use a Function to load the active graph window
3. Pick the range of Data in this graph
4. Identify the chosen X-Column (via User-Defined Parameter)
5. Pick a new X-Column (Depending on user input)
6. Exchange the Data-Points (either by exchanging the X-Link or by drawing a new XY-Pair and deleting the old one

I hope you can help me with this seemingly easy and still impossible task.

Best regards
Simon


Origin Ver. and Service Release (Select Help-->About Origin): Origin 2020 (64-bit) SR1
Operating System: Win10 64-bit up to date
3   L A T E S T    R E P L I E S    (Newest First)
siggi4 Posted - 02/24/2021 : 05:18:18 AM
Thanks for the answers :)
I got it working with a messy custom code in the meantime. I'll keep "changedata" in mind. That was what I was looking for but could not find. Now I got my own :D

Best regards
Simon
couturier Posted - 02/01/2021 : 03:21:38 AM
see DataPlot::ChangeData
一击爆裂陈子豪 Posted - 01/25/2021 : 09:26:26 AM
Normally I'll just delete the previous plot from he layer and add a new one.

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