(*  Plot the normalized activity and performance relative to
	a particular experiment and input type
*)

normaliz[lis_] :=
	Block[{min = Min[lis],
		max = Max[lis],
		range = max - min,
		new = {},
		current = lis},
	
		While[current != {},
			{
				new = Append[new, (First[current] - min)/range];
				current = Rest[current];
			}
			]
		Print[new];
		Return[new];
		]

input = "foo_3"
activity = ReadList[StringJoin[input, ".act"]]
performance = ReadList[StringJoin[input, ".perf"]]
nactivity = normaliz[activity]
gr1 = ListPlot[nactivity, PlotJoined -> True, PlotRange -> {0,1.1},
		PlotStyle -> {Thickness[0.0025]}, PlotLabel -> input]
gr2 = ListPlot[performance, PlotJoined -> True, PlotRange -> {0,1.1},
		PlotStyle -> {Thickness[.0025], Dashing[{0.002, 0.01}]}]
gr3 = Show[gr1, gr2]
Display[StringJoin[input, ".ps"], gr3]
