Author |
Topic  |
|
hapes
Germany
Posts |
Posted - 10/03/2005 : 5:23:27 PM
|
Origin Version (Select Help-->About Origin): 7.0 Operating System: win xp I have problems with the following command
set data_1 -b 100; set data_1 -e 200;
It has also an effect on the worksheet, and all the data are gone except of the above given range. How can I avoid this. I am just trying to plot only a specific rnage of data.
thanks for help. |
|
Mike Buess
USA
3037 Posts |
Posted - 10/04/2005 : 1:12:59 PM
|
If you just want to hide data points in the graph make sure the graph is active when you use the set -b/-e commands. The corresponding values in the worksheet will still be visible. To hide the values in the worksheet you must use set -b/-e while the worksheet is active.
Mike Buess Origin WebRing Member |
 |
|
hapes
Germany
Posts |
Posted - 10/04/2005 : 5:04:51 PM
|
Thanks Mike,
but the problem still exists if I run my script with the doc -e P command over all graph windows. Still the range is also set in the corresponding worksheet "data1" (columns e and h) to the specified range (and the data out of the range are deleted!). Any suggestions? Please find my script below. How could I ask if the specific dataset (means data1_e) is even plotted in the layer?
Thanks Hape
[SET_MYRANGE] %J="data1"; //data wks name %K=%J_e; //columns 1 %L=%J_h; //columns 2 a1=546; //range begin a2=a1+30; //range end
doc -e P { type ""; %H=; // over all graph windows win -a %H; //set current graph window active Loop (num,1,$(page.nlayers)) { // if (%K) // how can I ask if the above dataset (=%K) is // even plotted in this layer???? type "layer number $(num) %K" ; set %K -b a1; set %K -e a2; set %L -b a1; set %L -e a2; }; }; clr; return;
|
 |
|
Mike Buess
USA
3037 Posts |
Posted - 10/04/2005 : 8:59:23 PM
|
First of all, set dataset -b/-e merely hides data, it does not delete them. You can view all data again by activating each worksheet and using these commands...
set dataset -b 1; set dataset -e wks.maxrows;
I assume that all of your graph windows really show data from different worksheets and you want to plot the same range in all curves. If that's true you can try something like this...
[SET_MYRANGE] a1=546; //range begin a2=a1+30; //range end doc -e P { type -a %H; // type graph window name loop (num,1,page.nlayers) { type "layer number $(num)" ; page.active=num; // activate layer n lay -c; // count number of curves in layer loop (i,1,count) { # set range for each curve %A=%(i, @D); // dataset name type %A; set %A -b a1; set %A -e a2; }; }; }; clr; return;
If you really have multiple layer graphs you can shorten the script by looping over all graph layers and over all datasets in each layer...
[SET_MYRANGE] a1=546; //range begin a2=a1+30; //range end # loop over all graph layers doc -e LP { type -a %H layer $(page.active); // type graph window name and layer number # now loop over all datasets in layer doc -e D { type %C; // %C is dataset name set %C -b a1; set %C -e a2; }; }; clr; return;
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 10/05/2005 09:04:24 AM |
 |
|
|
Topic  |
|