home *** CD-ROM | disk | FTP | other *** search
- // Create the data
- X = -2:2:.2;
- Y = X;
- Z = [];
- for (i in 1:X.n) {
- for (j in 1:Y.n) {
- Z[i;j] = X[i] * exp (-X[i]^2 - Y[j]^2);
- }
- }
- // Make the plot
- pstart(,,"xwin");
- plwid(4);
- ptitle("Sample 3-D Plot");
- xlabel("X-Axis");
- ylabel("Y-Axis");
- zlabel("Z-Axis");
- plmesh( << x = X; y = Y; z = Z >> );
- plprint("3d.ps");
-