public void Function(PlotValue plot, MatrixValue series, StringValue property, Value newValue)
{
var s = new List <String>();
if (series is RangeValue)
{
var r = series as RangeValue;
var step = (Int32)r.Step;
var end = r.All ? plot.Count : (Int32)r.End;
for (var j = (Int32)r.Start; j <= end; j += step)
{
s.Add(j.ToString());
AlterSeriesProperty(plot, j - 1, property.Value, newValue);
}
}
else
{
var end = series.Length;
for (var i = 1; i <= end; i++)
{
var n = series[i].GetIntegerOrThrowException("series", Name);
s.Add(n.ToString());
AlterSeriesProperty(plot, n - 1, property.Value, newValue);
}
}
Context.RaiseNotification(new NotificationEventArgs(NotificationType.Failure, "Series " + String.Join(", ", s.ToArray()) + " changed."));
plot.UpdateProperties();
}