I've had no luck tweaking it on my own. The section of code that deals with making the graph is this below:
[YPlot]
//section identifier diag
type "Section Yplot";
%W=%H;
// worksheet must be active
if (exist(%w)!=2)
{
return;
}
// set time as x
%W!wks.col1.type=4;
// determine column
col=colnum(%W_%1);
//legacy diag
// type $(col) %1;
//if no columns are found, bail
if (col==0)
{
type -b %1 not acquired.;
return;
}
// set y
work -t $(col) 1; //set column $(col) to 1 = "(Y) column"
// plot
//win -t plot line; //create a new window from the template file, plot = "open a plot window", line = name assigned to window
win -t plot ggraph;
layer -i %w_%1; //add a dataset to the active layer - dataset name = %w_%1
layer -a; // -a - rescale the X and Y axes of the active layer to show all the data plotted in that layer
/* copy labels */
%a=%w!wks.col$(col).label$;
if (%a!="")
{
//remove 12/09 fix for doubled up labels
//// axis label fix -> reduce %a by removing 2nd line fetched by archaic .label$
//%a=%[%a,@1];
yl.text$=%a; /* null string causes GPF */
}
else
{
//diag
type "could not fetch Y axis label";
label -r YL;
}
%a=%w!wks.col1.label$;
if (%a!="")
{
//remove 12/09 fix for doubled up labels
//// axis label fix -> reduce %a by removing 2nd line fetched by archaic .label$
//%a=%[%a,@1];
XB.text$=%a;
}
else
{
//diag
type "could not fetch X axis label";
label -r XB;
}
%a=%w!page.label$;
//Call Title - note that it destroys the contents of %b
run.section(,GTitle, "%a");
//legend.show=0; /* hide legend */
//make the window width match the initial graph
//page.width = 6600;
// rename the plot window to the items graphed
page.label$ = "%1 vs. Time";
return 0;
Using your suggestion I wasn't able to make the graphs the Active Item. this is a project I've taken over form someone else so I'm still learning the code.
Thank you,
gleeblejim