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
 Origin Forum
 Sort data+error(s) columns by label

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
AKazak Posted - 12/09/2020 : 05:48:35 AM
OriginPro 2021 (64-bit) 9.8.0.200
Windows 7 Pro x64 SP1

Greetings!

I want to sort data-error pair of columns by Mean label:


How do I achieve this properly using Origin's toolbox?

Thank you.

---
Andrey
7   L A T E S T    R E P L I E S    (Newest First)
AKazak Posted - 12/10/2020 : 12:57:19 PM
quote:
Originally posted by YimingChen

Please modify the script accordingly. Use the script below in your case. Then sort worksheet by column header row Mean.

if (mod(j,2) == 1){
    wcol(j)[D1]$ = wcol(j-1)[D1]$;
}

James



This works --- thank you.
However, by default, It would be great if Error columns will stick to their host data columns (both X and Y) while being sorted.

---
Andrey
YimingChen Posted - 12/10/2020 : 09:21:17 AM
Please modify the script accordingly. Use the script below in your case. Then sort worksheet by column header row Mean.

if (mod(j,2) == 1){
    wcol(j)[D1]$ = wcol(j-1)[D1]$;
}




James
AKazak Posted - 12/09/2020 : 10:34:47 PM
quote:
Originally posted by YimingChen

I don't see attached picture. You should have yerr columns fill with numbers now, see below:

Then use menu Worksheet-> Sort Columns By Labels.. to sort by Long Name descending.

James



This will not produce the desired result.
Please compare Original and Sorted sheets in the attached project: https://my.originlab.com/ftp/forum_and_kbase/Images/Column%20Sorting%20Test.opju

---
Andrey
YimingChen Posted - 12/09/2020 : 12:14:41 PM
I don't see attached picture. You should have yerr columns fill with numbers now, see below:


Then use menu Worksheet-> Sort Columns By Labels.. to sort by Long Name descending.

James
AKazak Posted - 12/09/2020 : 11:10:05 AM
quote:
Originally posted by YimingChen

One workaround is to first set the error column Longname the same as corresponding y column and then sort by Longname. You have YYerrYYerr... kind of data, you can select all y and yerror columns, right click and select Set Multiple Column Values..., Put the LT script in Before Formula Scripts box and Apply.

if (mod(j,2) == 0){
    wcol(j)[L]$ = wcol(j-1)[L]$;
}


James



Thank you for the suggestion.
It is like this now (see the screenshot above).
Now how do I sort YYerrYYerr... columns my Y Mean, say descending while keeping YYerr together?

---
Andrey
YimingChen Posted - 12/09/2020 : 10:11:40 AM
One workaround is to first set the error column Longname the same as corresponding y column and then sort by Longname. You have YYerrYYerr... kind of data, you can select all y and yerror columns, right click and select Set Multiple Column Values..., Put the LT script in Before Formula Scripts box and Apply.

if (mod(j,2) == 0){
    wcol(j)[L]$ = wcol(j-1)[L]$;
}


James

snowli Posted - 12/09/2020 : 09:33:30 AM
We have Worksheet: Sort Columns by Label but it checks each column individually.

Jira created: ORG-22970. I will check with developer if we should consider corresponding error bar, X, etc.

Thanks, Snow

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