Author |
Topic |
|
redman
UK
59 Posts |
Posted - 03/23/2010 : 6:59:40 PM
|
Origin Ver. and Service Release (Select Help-->About Origin): 8.0SR6 Operating System: XP
Is it possible to access the plot details by labtalk scripts? For example for grouped datasets in a graph, to change the plot type from scatter to line scatter, change the fill color (or line/border color) from "color list basic" to "color list default".
Thanks a lot. |
|
larry_lan
China
Posts |
|
redman
UK
59 Posts |
Posted - 03/26/2010 : 06:43:35 AM
|
Thanks, but it make no sense. The set command can only affect one dataplot each time. My purpose is to change their properties of grouped dataplots with preset schemes (line/symbol scheme, color scheme...)
Wish greg or cpyang could give an answer.
Thanks a lot. |
Edited by - redman on 03/26/2010 06:54:18 AM |
|
|
greg
USA
1378 Posts |
Posted - 03/29/2010 : 10:03:17 AM
|
You are correct that most of the SET commands work only on individual datasets not in a group, however the line connection method can be used to change a group Scatter plot into a group Line+Symbol plot with: set %C -l 1; This is a legacy of the fact that Line, Line+Symbol and Scatter are all Line+Symbol where Scatter has no line connection and Line has zero symbol size.
You can then use the themeApply2g X-Function to apply a Theme to your graph as in: themeApply2g theme:="Color List Default";
For any more, LabTalk does not have access to everything you want, for which you would need OriginC. In general, we recommend that you create pre-defined graph Templates. Another option is to Ungroup and then use the SET command on each dataplot. layer -gu; // Ungroup the plots in the current layer |
|
|
redman
UK
59 Posts |
Posted - 03/30/2010 : 5:52:31 PM
|
Greg, thanks a lot. Nevertheless, your answer is quite helpful. |
|
|
kdsaransh
India
89 Posts |
Posted - 01/18/2015 : 11:12:46 AM
|
Hello,
Suppose i have three graphs in a single layer and so after ungrouping the plots using layer -gu; command, how can i individually change their properties.
Thanks |
|
|
Shirley_GZ
China
Posts |
|
kdsaransh
India
89 Posts |
Posted - 01/19/2015 : 04:42:49 AM
|
Hi,
Thanks, I tried the set command , but i still have a small problem. I am not able to individually change the properties because I am not able to make active the other graph.
Thanks again.
|
|
|
Shirley_GZ
China
Posts |
|
HelenSingleton
USA
1 Posts |
Posted - 02/10/2015 : 11:41:33 PM
|
Use the set command. See this example.
Helen
|
|
|
Stulle
Germany
1 Posts |
Posted - 09/20/2017 : 06:44:39 AM
|
All previous answers are pointing in the rigth direction, but I had to do much trial and error to come finally to this code:
// activate the graph window. This is even needed if you plotted it in preceding code. window -a Graph10000; // An object handle is required, unfortunately you can`t do [Graph10000]layer1!plot = 1 directly. range lay1 = [Graph10000]layer1!; // chose the curve dataset to be activated (1 is the first plotted curve). lay1.plot = 1; // set color of activated dataset, where %C represents the activated curve dataset set %C -c color(Red); |
|
|
|
Topic |
|