T O P I C R E V I E W |
redman |
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. |
10 L A T E S T R E P L I E S (Newest First) |
Stulle |
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); |
HelenSingleton |
Posted - 02/10/2015 : 11:41:33 PM Use the set command. See this example.
Helen
|
Shirley_GZ |
Posted - 01/19/2015 : 05:14:52 AM You can use below script to change the active data plot:
layer1.plot = 2; //Activate the second plot in layer1
http://www.originlab.com/doc/LabTalk/ref/Layer-obj
Originlab Technical Service Team |
kdsaransh |
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 |
Posted - 01/19/2015 : 03:41:17 AM Hi,
To customize the properties of each data plot individually using LabTalk, please refer to the below help pages:
http://www.originlab.com/doc/LabTalk/guide/Formatting-Graphs#Data_Plot_Properties
http://www.originlab.com/doc/LabTalk/ref/Set-cmd
Additionally, you can use below script to change the active data plot:
layer1.plot = 2; //Activate the second plot in layer1 http://www.originlab.com/doc/LabTalk/ref/Layer-obj
Thanks, Shirley
Originlab Technical Service Team |
kdsaransh |
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 |
redman |
Posted - 03/30/2010 : 5:52:31 PM Greg, thanks a lot. Nevertheless, your answer is quite helpful. |
greg |
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 |
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. |
larry_lan |
Posted - 03/25/2010 : 10:46:55 PM Hi:
You can try the set command. See this example.
Larry |