Hi All,
I have saved the script from graph builder to produce a desired graph. I have dragged my variables and dragged my list (:Sample) onto the Wrap to produce the same graph for each category. I am trying to figure out a way of printing the same graph type for all. The issue is that running the script from graph builder will only produce one graph (which ever comes first). I thought that I would need a Loop and I have written below but does not work. Is there anyone that could give me some clues on how to do this or if you could tell me what am I doing wrong?
for(g=1, g<=N items(::Sample), g++,
For(i=1,i<=N items(Eval(::Sample[g])), i++,
gb= dt4 << Graph Builder(
Size( 894, 625 ),
Legend Position( "Bottom" ),
Show Title( 0 ),
Variables(
X( :Days ),
Y( :Model Biogas yield ),
Y( :Biogas Yield, Position( 1 ) ),
Group X( :Sample, Show Title( 0 ), N View Levels( 1 ) )
),
Elements(
Points( X, Y( 2 ), Legend( 14 ), Jitter Limit( 1.1193 ) ),
Smoother( X, Y( 1 ), Legend( 15 ) )
),
SendToReport(
Dispatch(
{},
"Days",
ScaleBox,
{Min( 0 ), Max( 21 ), Inc( 1 ), Minor Ticks( 1 ),
Label Row(
{Inside Ticks( 1 ), Set Font( "Calibri" ), Set Font Size( 14 )}
)}
),
Dispatch(
{},
"Model Biogas yield",
ScaleBox,
{Min( 0 ), Max( 700 ), Inc( 50 ), Minor Ticks( 0 ),
Label Row(
{Inside Ticks( 1 ), Set Font( "Calibri" ), Set Font Size( 14 )}
)}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
14,
Level Name( 0, "Experimental", Item ID( "Biogas Yield", 1 ) ),
Properties( 0, {Marker Size( 5 )}, Item ID( "Biogas Yield", 1 ) )
), Legend Model(
15,
Level Name( 0, "Model", Item ID( "Smooth(Model Biogas yield)", 1 ) ),
Properties(
0,
{Line Color( 32 ), Line Width( 3 )},
Item ID( "Smooth(Model Biogas yield)", 1 )
)
)}
),
Dispatch(
{},
"X title",
TextEditBox,
{Set Font( "Calibri" ), Set Font Size( 14 )}
),
Dispatch(
{},
"Y title",
TextEditBox,
{Set Font( "Calibri" ), Set Font Size( 14 ),
Set Text( "Biogas yield (m3/t VS)" )}
)
)
);
gb<< Save picture ("C:\data\Graph Builder_" || ::Sample[g]||".jpg", JPEG);
););