legend() makes stk_plot1d very slow, even when no legend is displayed !
Look for instance at this example:
[xi, zi0, ref] = stk_dataset_twobumps ('noiseless');
stk_figure ('stk_example_kb01 (b)');
for i = 1:20
zi = zi0 + 0.2 * rand (size (zi0));
zp = stk_predict (stk_model ('stk_materncov_iso'), xi, zi, ref.xt);
stk_plot1d (xi, zi, ref.xt, ref.zt, zp); drawnow;
end
Here is the profiler output:

Problem solved, I think:
https://sourceforge.net/p/kriging/hg/ci/1ca2d0c281f012ce68e329d2fc2952e3bf53ea87/