Runtime

2D and 3D graphics

Hosted plotting in Sun Studio with validated numeric inputs.

01

2D curves

Sun
x = 0:0.1:6;
plot(x, sin(x));
title("Sine");
xlabel("Time (s)");
ylabel("Amplitude");
grid(true);
02

3D curves and surfaces

Sun
x = -2:0.2:2;
y = transpose(x);
Z = x .* x + y .* y;
surf(x, y, Z);
title("Paraboloid");
zlabel("Z");
03

Host requirement

Support boundary

Graphics require a host with figure support, such as Sun Studio. The terminal host and LLVM backend reject plotting rather than silently dropping it.