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
 LabTalk Forum
 Dataset order in plots

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
peter.cook Posted - 08/05/2004 : 5:06:53 PM
Hi,

I would like to be ab le to check the order of datasets in a plot (labtalk pref but c would do) and then alter it. Even if i can just send one dataset to the 'top'.

Any ideas?

Cheers,

pete

1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 08/05/2004 : 7:37:16 PM
Hi Pete,

You can read the current order with 'lay -c', which counts the plots and lists the dataset names in the string variable %Z...

%Z=""; lay -c;
count=; // how many datasets are plotted?
COUNT=3
%Z=;
(Data1_B) (Data1_C) (Data1_D)

Now reverse the plot order (this is the only built-in reordering command that I know of)...

lay -r;
%Z=""; lay -c; %Z=;
(Data1_D) (Data1_C) (Data1_B)

Next, move Data1_D to the 'bottom'...

lay -e Data1_D; // remove Data1_D from layer
lay -i Data1_D; // plot it again (as last dataplot)
%Z=""; lay -c; %Z=;
(Data1_C) (Data1_B) (Data1_D)

Finally, move Data1_B to the 'top' (somewhat more complicated)...

%Z=""; lay -c; // list all data plots to %Z
lay -e %Z; // remove all plots from layer
lay -i Data1_B; // plot Data1_B first
loop (i,1,count) {
%A=%[%Z,#i]; // plot remaining datasets
if(%A!="Data1_B") lay -i %A;
};
%Z=""; lay -c; %Z=;
(Data1_B) (Data1_C) (Data1_D)

I'm not sure if the last two 'moves' will preserve the plot types and colors but you get the idea. Once you know the names of the current datasets you can replot them in any order you want.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 08/05/2004 7:42:44 PM

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