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. |
|
|