import display, contour, plot3d, colorschemes, tokenize; load("matrix.dll"); X = matrix("double", 1, (2001-1983+1)*12); X:fill(1983, 1.0/12.0); Y = matrix(80, 60, 40, 20, 0, -20, -40, -60, -80); Z = matrix("double"); Z:readtext("test.dat"); Z:trans(); a = rgb_bl2do(); cbar = colorbar(a[0], a[1], a[2], [335, 357.5, 340, 342.5, 345, 347.5, 350, 352.5, 355, 357.5, 360, 362.5, 365, 367.5, 370, 372.5, 375, 377.5], 0, false); G = plot3d(1000, 700, 1983, 2002, 1, -90, 90, 30, 335, 375, 10); plot = G.plot; plot:scale(.5, .5, .3); Q = mesh_grid(Z, X, Y); Q:fill(1); plot:add(Q); V = Q:vertex(); N = V:normal(4); N:scale(-1, 1, -1); // because vertex y is from north to south Q:normal(N); C = V:color(cbar); Q:color(C); M = zegraph("polygon"); M:type("quads"); M:fill(-1); M:vertex(V); M:color(.5, .5, .5); M:translate(0, 0, .1); plot:add(M); light = G.light; light:position(-1, 1, 1); axis = G.xaxis; axis:title("Year"); axis:tickmarks(1983, 2, 1); axis:tickdigits(0); axis = G.yaxis; axis:title("Latitude"); axis:tickdigits(0); axis = G.zaxis; axis:title("CO2 (ppm)"); axis:tickdigits(0); axis:tickmarks(340, 10, 1); //render= G.render; //render:tofile("test.png"); animate(G.render, plot, G.rotatex, G.rotatez);