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
 Plot color change after layer -gu

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
FS_S Posted - 07/01/2010 : 04:45:06 AM
Origin Ver. and Service Release (Select Help-->About Origin): 8G SR2
Operating System: WinXP

Hi everyone,

I have some problems working with grouped line plots.
I added several plots to one layer using the following sequence of commands:

window -a Graph;
layer -i %B_Voltage1;
layer -i %B_Voltage2;
layer -i %B_Voltage3;
layer -g;
legend;
layer -a;

I don't know the number of plots which are added as it depends on the number of files which are imported via the script. To have the standard color sequence for the curves I then used:

themeApply2g theme:= "Color List Default" option:=project;

which is ok, because I want the same color sequence for all graphs in the project. Afterwards I ungroup the plots again using:

layer -gu;

so that the user can acces the line plots individually but still has the default list colors.
So far, so good. The colors are ok when I group, change the color, and ungroup the plots within the script window but it does not when I do the same with an external .ogs script. The color list is somehow lost on the way and suddenly all curves are black or red after the ungroup command.
I just copied the commands from the script window into the .ogs file and it looks different. Why? Any suggestions are highly appreciated.

Thanks
Frank
2   L A T E S T    R E P L I E S    (Newest First)
FS_S Posted - 07/02/2010 : 05:13:23 AM
Hi Greg,

It really was a timing issue. It just takes over 1 second to change the colors within the six graph windows I use. So when I ungrouped the plots in the script, nothing had really happened, yet.
Thanks for the quick answer.

Frank
greg Posted - 07/01/2010 : 3:05:29 PM
This is one of those odd cases where timing becomes critical.

I come across these every once in a while and I can't give you an explanation of why this happens, but the datasets are ungrouping before the theme is applied. You stated that this only occurs when running an external OGS while the same code in the Script Window is fine, but I bet if you try the same experiment a few times you may have different results, or one computer may be fine and another fails.

Insert
sec -p .1; // pause for 0.1 seconds
before the
layer -gu;
and everything should be fine.

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