Normally a display() starts with an implicit cls(). This is perfect as long as it doesn't happen too often. During measurements, an update of the screen is more appropriate than a complete re-display. That is the purpose of the "update" => "yes" switch, see the following example:
use Spectra;
delete();
cls();
my $np = 401;
my $sin = SCAN->create( name => "sinus",
start => 0,
stop => 10,
title => "Sinus",
np => "$np",
at => "(1,2,1)");
my $tan = SCAN->create( name => "tangens",
start => 0,
stop => 10,
title => "Tangens",
np => $np,
at => "(1,2,2)");
$sin->calc( "expr" => "sin(x(sinus))");
$tan->calc( "expr" => "tan(x(tangens))");
foreach my $i( 1 .. $np)
{
$sin->set( curr => $i);
$tan->set( curr => $i);
Autoscale( y => "yes");
display( update => "yes");
}